window.close不提示网页正在关闭的代码
2013-02-04 15:38
337 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>xxxx</title> <script type="text/JavaScript"> function Close() { var ua=navigator.userAgent var ie=navigator.appName=="Microsoft Internet Explorer"?true:false if(ie) { var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE ")))) if(IEversion< 5.5) { var str = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">' str += '<param name="Command" value="Close"></object>'; document.body.insertAdjacentHTML("beforeEnd", str); document.all.noTipClose.Click(); }else { window.opener =null; window.open('','_self','');//for IE7 window.close(); } }else{ window.close() } } function openNewWin() { newwindow=window.open( "index.jsp", "", "menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=yes,status=yes") if(document.all){ newwindow.moveTo(0,0); newwindow.resizeTo(screen.width,screen.height); } newwindow.opener=null; Close(); } </script> </head> <body onLoad="openNewWin()"> </body> </html>
相关文章推荐
- 让window.close不提示:您查看的网页正在试图关闭窗口(转)
- 让window.close不提示:您查看的网页正在试图关闭窗口。是否关闭此窗口?
- window.close 关闭网页不弹出系统提示的方法
- IE8中使用 window.close()关闭网页时提示框的回避方法
- IE8中使用 window.close()关闭网页时提示框的回避方法
- window.close关闭窗口,不弹出系统提示,直接关闭
- 不提示直接关闭网页窗口的JS示例代码
- 不提示直接关闭网页窗口的JS代码
- JS无提示关闭浏览器窗口脚本以及不同浏览器对window.close()不同表现
- 不提示直接关闭网页窗口的JS代码
- 用window.close()关闭而不弹出提示窗口
- 如何在javascript里用window.close(); 关闭窗口时不提示“是否要关闭本窗口”!
- window.close取消关闭提示.
- window.close取消关闭提示.
- window.close() 不出现提示“是否要关闭本窗口”
- window.close关闭窗口,不弹出系统提示,直接关闭
- 实现调用window.close()关闭窗口时IE不提示
- window.close()自动关闭窗口时提示的解决
- 网页关闭(解决window.close在火狐下不兼容问题)
- window.close关闭窗口,不弹出系统提示,直接关闭