当前位置:首页 > 站长必备 > IE6-7-8 JS关闭窗口不提示的方法(强制关闭)

IE6-7-8 JS关闭窗口不提示的方法(强制关闭)

snuday15年前 (2010-03-23)站长必备62

 

IE6-7 JS关闭窗口不提示的方法

 

2

推荐
方法一:

js 代码

function CloseWin() //这个不会提示是否关闭浏览器

{

window.opener=null;

//window.opener=top;

window.open("","_self");

window.close();

}

方法二:

open.html

js 代码

function open_complex_self() {

var obj_window = window.open('close.html', '_self');

obj_window.opener = window;

obj_window.focus();

}

close.html

js 代码

window.close();

另附:

//普通带提示关闭

function closeie(){

window.close();

}

//关闭IE6不提示

function closeie6(){

window.opener=null;

window.close();

}

//关闭IE7不提示

function closeie7(){

window.open('','_top');

window.top.close();

}

 


标签: IE关闭窗口

相关文章

CSS兼容必备完美实现Firefox、IE6、IE8、Mac等主流浏览器,所有元素清零

CSS兼容必备完美实现Firefox、IE6、IE8、Mac等主流浏览器,所有元素清零

html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, ac...