http://www.cnblogs.com/huobazi/archive/2004/07/10/22926.aspx
我这里也有一个类似的解决方案:
<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>
这个的好处就是不用改变已有的代码。只要想办法把这个代码放进原来的网页的前面把window.open替换掉就可以了。
打印 | posted on Monday, July 12, 2004 10:43 AM | Filed Under [ Browser ] | 收藏本页 (百度搜藏)(QQ书签)(Live收藏)(Google书签)(Yahoo书签)(新浪ViVi)(搜狐网摘)(365Key网摘)(天极网摘)(博采网摘)(和讯网摘)
Powered by:
Copyright © lostinet