window.opener=null;window.close(),只支持IE6不支持IE7的问题

打开新窗口并且关闭本窗口不弹出要关闭窗口前的提示
function openWin(){
window.open('login.jsp','','fullscreen=yes,menubar=no,resizable=no');
window.opener=null;
window.close();
}


在IE7下为

function openWin(){

window.opener=null;
window.open('login.jsp','','fullscreen=yes,menubar=no,resizable=no');
window.close();
}

 

///////////////////////
<a href="#" onclick="window.opener=null;window.open('','_self');window.close();"> 不确认关闭 </a>
也就是在window.opener=null;window.close()之间加入window.open('','_self');
就OK了!

相关文章:

  • 2022-12-23
  • 2021-10-23
  • 2021-11-09
  • 2021-04-17
  • 2022-03-07
  • 2021-09-10
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2021-09-11
  • 2022-12-23
  • 2021-11-02
相关资源
相似解决方案