Home  >  Article  >  Web Front-end  >  Solve the problem of window.opener=null;window.close(), only supports IE6 but not IE7, IE8_javascript skills

Solve the problem of window.opener=null;window.close(), only supports IE6 but not IE7, IE8_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:03:491500browse

window.opener=null;window.close(), only supports IE6 but not IE7

Open a new window and close this window without popping up the prompt before closing the window
function openWin(){
window.open('login.jsp','','fullscreen=yes,menubar=no ,resizable=no');
window.opener=null;
window.close();
}


is

in IE7

function openWin(){

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

////////////////////////
Do not confirm closing
That is, add window.open(' between window.opener=null;window.close() ','_self');
That's OK!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn