刚看到一个帖子:问求js脚本关闭当前浏览器,不提示询问关闭窗口(IE6.0)。我想问ie7 8 firefox 等关闭浏览器不提示关闭窗口的代码是什么 曾经有人问过 好似如果点的不是 button A 之类的标签就会提示. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以用js模拟。。测试了下,不支持FIREFOX.等待高人。<html><head><title>关闭窗口</title></head><body></body><form><input type="button" value="关闭窗口" onclick="closeWindow()" /></form><script type="text/javascript">function closeWindow(){ window.open('','_parent',''); window.close(); } </script></html> 没人回答 吗google和firefox的关闭代码是什么? 呵呵,这个代码不是分IE还是FF无提示关闭必须是脚本弹出的窗口才可以 a.html<!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=gb2312" /><title>无标题文档</title><script>window.open('b.html')</script></head><body></body></html>b.html<!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=gb2312" /><title>无标题文档</title><script type="text/javascript">function closeWindow(){ window.open('','_parent',''); window.close(); } </script></head><body><form><input type="button" value="关闭窗口" onclick="closeWindow()" /></form></body></html>如果你单独运行b.html,那么你按关闭还是有提示但如果是由a.html弹出的来的b.html那么按关闭就没有提示不信的自己测试 你按我说的试试就知道,不管在IE还是FF只要是由a.html弹出的来的b.html那么按关闭就没有提示 请教javascript中读取数据库一列内容并以select下拉菜单的形式显示 js可以获取一个div元素的宽度不? 谁能偷到这个弹窗效果啊! 屏蔽javascript引和flash右键弹出的菜单? onclick 代码和ed2k在一起不能正常使用?有其他办法解决吗? [请问]如何用css将一个正方形图片显示为一个圆形图片 如何与文本框一道隐藏说明文本? 关于dom 请问如何得到一组同名的CheckBox选择个数? 在线高分求救:在ASP中,如何动态定义javascript变量?(解答出来再开新贴给分) 页面平滑转换问题 javascript 遇 反斜杠出现乱码 求解,谢谢
<head><title>关闭窗口</title></head>
<body>
</body>
<form>
<input type="button" value="关闭窗口" onclick="closeWindow()" />
</form>
<script type="text/javascript">
function closeWindow()
{
window.open('','_parent','');
window.close();
}
</script>
</html>
google和firefox的关闭代码是什么?
无提示关闭
必须是脚本弹出的窗口才可以
<!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=gb2312" />
<title>无标题文档</title>
<script>
window.open('b.html')
</script>
</head><body>
</body>
</html>
b.html<!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=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function closeWindow()
{
window.open('','_parent','');
window.close();
}
</script>
</head><body>
<form>
<input type="button" value="关闭窗口" onclick="closeWindow()" />
</form>
</body>
</html>如果你单独运行b.html,那么你按关闭还是有提示
但如果是由a.html弹出的来的b.html那么按关闭就没有提示不信的自己测试
只要是由a.html弹出的来的b.html那么按关闭就没有提示