消除window.close()的提示窗口(ie6 ie7)
来源:互联网 发布:向js数组中添加元素 编辑:程序博客网 时间:2024/06/04 20:00
Window.close()这句脚本是用来关闭当前窗口,如果是在window.open的窗口中执行Window.close(),将会很顺利地将窗口关闭,但如果是在一非window.open打开的窗口中执行Window.close(),将会弹出一个提示窗口,如下:
要在程序中消除这个提示框也很简单,不过在IE6和IE7稍有不同
1. IE6
function closeWin()
{
window.opener=null;
window.close();
}
2.IE7
function closeWin()
{
window.open('','_self','');
window.close();
}
function openwin()
{
var xwin=window.open("main.aspx","main","toolbar=no,status=yes,resizable=no");
xwin.moveTo(0,0);
xwin.resizeTo(window.screen.width,window.screen.height-25);
window.opener=null;
// window.open('','','');
window.open('','_self','width=1px,height=1px');
window.close();
}
}
- 消除window.close()的提示窗口(ie6 ie7)
- 消除window.close()的提示窗口(ie6 ie7)
- 消除 window.close()的提示窗口
- 解决IE7的window.close()弹出确认提示框
- IE6,IE7下关闭窗口无提示的代码
- IE6、IE7、Firefox无提示关闭窗口的代码
- IE6、IE7、Firefox无提示关闭窗口的代码
- 兼容IE6与IE7的无提示窗口关闭代码
- IE6、IE7、Firefox无提示关闭窗口的代码
- window.close()自动关闭窗口时提示的解决
- IE6和IE7无提示关闭窗口
- [javascript]解决IE7的window.close()不弹出确认提示框
- IE6\7\8中window.close()不提示
- IE6 IE7上的window.resize bug
- 修正IE6 IE7的window.resize bug
- IE6和IE7关闭窗口时提示 及上传图片前的本地预览解决办法
- 关闭窗口不弹出提示对话框--ie6 和ie7
- IE6 IE7 firefox 关闭 窗口 不提示 JavaScript html
- Linux项目组编程规范
- Larbin 搜索引擎源码赏析——(六)一个自定义的数组模板
- plsql developer 普通用户没有调试权限的解决方法
- 树-二叉排序树的基本算法
- EJBException: Invalid invocation, check your deployment packaging creat
- 消除window.close()的提示窗口(ie6 ie7)
- EnumProcess(Source Code), 列举当前系统下所有进程
- 隐藏按钮和disable 属性
- wap登录结束
- 关于Struts里提交中文表单到ActionForm后的乱码问题
- 学习C++:实践者的方法(Beta1)
- between ... and 的一般使用
- .Net中窗体间传递值的一种方法
- 14.向login程序添加校验