在IE7、IE8中,使用JavaScript提供的close()方法都可以关闭当前窗口或标签,但都提示讨厌的对话框,找了下代码,终于可以无提示直接关闭了。
JavaScript代码
XML/HTML代码
1.
对于父窗口打开子窗口,点击子窗口关闭,同时关闭父窗口的操作:
var windowParent = window.opener;
windowParent.opener = null;
windowParent.open('', '_self');
windowParent.close();
java怎么学习?java怎么入门?java在哪学?java怎么学才快?不用担心,这里为大家提供了java速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号