<html> <head> <script type="text/javascript"> function goHome(){ var isIE = navigator.appName == "Microsoft Internet Explorer"; //alert(isIE); if(isIE){ window.opener = ""; window.open("","_self"); window.close(); } else{ /*FF 还要在 about:config 允许脚本脚本关闭窗口*/ window.close(); } } </script> </head> <body> <a href="javascript:void 0;" onclick="goHome()">点我直接关闭</a> </body> </html> |
|
来自: 仰望//45度微笑 > 《JQuery Js》