1.用dhtml防止软件拦截探出窗口,不过不能保证100%成功:
<script>
window._open=window.open;
window.open=window_new_open;
function window_new_open( a,b,c )
{
var win;
if( c )
win=window._open( a,b,c );
else if( b )
win=window._open( a,b );
else
win=window._open( a );
if( win!=null&&!win.closed )
return win; var option='status:0;help:0;dialogleft:10000px;dialogtop:10000px;dialogheight:0px;dialogwidth:0px'; win=showModalDialog( 'open.htm',[a,b,c],option ); return win;
}
</script>
<script>var win=window.open( 'http://www.lostinet.com/' );win.close( );</script>open.htm
<title> </title>
<script>
function window.onload( )
{
var args=window.dialogArguments;
var a=args[0];
var b=args[1];
var c=args[2]
var win;
if( c )
win=window.open( a,b,c );
else if( b )
win=window.open( a,b );
else
win=window.open( a );
window.returnValue=win;
window.close( );
}
</script>2.加个opener=null可以不出现提示直接关闭窗口
<a href=javascript:window.opener=null;window.close()>Close</a>
<script>
window._open=window.open;
window.open=window_new_open;
function window_new_open( a,b,c )
{
var win;
if( c )
win=window._open( a,b,c );
else if( b )
win=window._open( a,b );
else
win=window._open( a );
if( win!=null&&!win.closed )
return win; var option='status:0;help:0;dialogleft:10000px;dialogtop:10000px;dialogheight:0px;dialogwidth:0px'; win=showModalDialog( 'open.htm',[a,b,c],option ); return win;
}
</script>
<script>var win=window.open( 'http://www.lostinet.com/' );win.close( );</script>open.htm
<title> </title>
<script>
function window.onload( )
{
var args=window.dialogArguments;
var a=args[0];
var b=args[1];
var c=args[2]
var win;
if( c )
win=window.open( a,b,c );
else if( b )
win=window.open( a,b );
else
win=window.open( a );
window.returnValue=win;
window.close( );
}
</script>2.加个opener=null可以不出现提示直接关闭窗口
<a href=javascript:window.opener=null;window.close()>Close</a>
验证通过就输出:
<Script>
top.location="index.asp";
</script>
不通过,输出
alert("错误信息");不就OK了?
假如成功:
<form action="index.asp" name=mm target="_blank"></form>
<script>
document.mm.submit();
window.opener = "meizz"; //IE5.5+不会有提示
window.close();
</script>
我有没有办法判断我弹出的IE窗体是否被3721等工具拦截了?