方法一:
js 代码
- function CloseWin() //这个不会提示是否关闭浏览器
- {
- window.opener=null;
- //window.opener=top;
- window.open("","_self");
- window.close();
- }
方法二:
open.htmljs 代码
- function open_complex_self() {
- var obj_window = window.open('close.html', '_self');
- obj_window.opener = window;
- obj_window.focus();
- }
close.htmljs 代码window.close();另附:
//普通带提示关闭function closeie(){
window.close();
}//关闭IE6不提示
function closeie6(){
window.opener=null;
window.close();
}//关闭IE7不提示
function closeie7(){
window.open('','_top');
window.top.close();
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12379366/viewspace-206173/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12379366/viewspace-206173/