当前第2页 返回上一页
js 代码
1 2 3 4 5 6 7 | function CloseWin()
{
window.opener= null ;
window.open( "" , "_self" );
window.close();
}
|
方法二:
open.html
js 代码
1 2 3 4 5 | function open_complex_self() {
var obj_window = window.open( 'close.html' , '_self' );
obj_window.opener = window;
obj_window.focus();
}
|
close.html
js 代码
另附:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function closeie(){
window.close();
}
function closeie6(){
window.opener= null ;
window.close();
}
function closeie7(){
window.open( '' , '_top' );
window.top.close();
}
|
【推荐学习:javascript高级教程】
以上就是javascript如何自动关闭窗口的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
三分钟带你了解js和jsp的区别
鲜为人知的 json.stringify 用法
原生js封装ajax方法
javascript时间戳如何转化为日期
js如何实现原生map
js为什么回调?
利用html+css+js实现简单的点赞效果
js如何实现简单的表格增删效果
js如何调用php
带你了解js中[]、{}、()区别(详解)
更多相关阅读请进入《js》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » javascript如何自动关闭窗口