JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome (Close the current page window without confirm by JavaScript, support all browsers)
来源:互联网 发布:微博刷赞软件手机版 编辑:程序博客网 时间:2024/05/28 19:25
Test by IE7/ Firefox 3.0/ Google Chrome
CloseDemo.htm
<script>
var browserName=navigator.appName;
if (browserName=="Netscape")
{
function closeme()
{
window.open('','_parent','');
window.close();
}
}
else
{
if (browserName=="Microsoft Internet Explorer")
{
function closynoshowsme()
{
window.opener = "whocares";
window.close();
}
}
}
</script>
<input type="button" value="close me 3" onclick="closeme();"/>
<script>
var browserName=navigator.appName;
if (browserName=="Netscape")
{
function closeme()
{
window.open('','_parent','');
window.close();
}
}
else
{
if (browserName=="Microsoft Internet Explorer")
{
function closynoshowsme()
{
window.opener = "whocares";
window.close();
}
}
}
</script>
<input type="button" value="close me 3" onclick="closeme();"/>
Note:
If you are using Firefox, please make sure your settings:
1.type "about:config" into your address bar, and enter.
2.find the key named "dom.allow_scripts_to_close_windows" make sure the value is True
OK, enjoy the code
- JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome (Close the current page window without confirm by JavaScript, support all browsers)
- JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome
- JavaScript无提示关闭窗口(兼容IE/Firefox/Chrome)
- JavaScript无提示关闭窗口(兼容IE/Firefox/Chrome)
- JavaScript无提示关闭窗口(兼容IE/Firefox/Chrome)
- javascript关闭窗口(兼容firefox,IE)
- javascript关闭窗口(兼容firefox,IE)
- javascript关闭窗口(兼容firefox,IE)
- javascript关闭窗口(兼容firefox,IE)
- javascript关闭窗口(兼容firefox,IE)
- javascript window.close()无法关闭当前标签页面
- javascript window.close()屏蔽提示框直接关闭页面
- 使用javascript代码无提示关闭浏览器窗口(兼容IE与火狐)
- JS使用window.close()关闭当前页(兼容firefox)
- IE,Firefox下无提示关闭窗口
- IE,Firefox下无提示关闭窗口
- javascript关闭firefox窗口,无警告提示的
- 兼容版本的无提示关闭窗口(JavaScript)!
- 比google和百度牛的十倍的搜索类网站(一定要收藏,肯定会有用的)
- ASP+AJAX应用之注册用户即时检测
- day day up
- 解决weblogic下报java.net.ProtocolException: Exceeded stated content-length of异常问题
- GridView 中 DataFormatString 的使用
- JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome (Close the current page window without confirm by JavaScript, support all browsers)
- 为gridview “删除”列添加确认对话框
- RegQueryValueEx函数返回234错误解决方法
- 防止被进程附加调试
- 什么是CSS
- 如何在GridView的RowCommand事件中获取当前的GridViewRow
- CSS元素的定义
- GridView的操作大全
- __doPostBack函数