加一個延遲,窗口就不會關(guān)這么快了啦
<!DOCTYPE?HTML> <html> <head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> <title>close()</title> ??<script?type="text/javascript"> ?????var?mywin=window.open("http://idcbgp.cn"); ??????? ????setTimeout(function(){mywin.open();},?5000);?? ????setTimeout(function(){mywin.close();},?5000); ???</script> </head> <body> </body> </html>
2015-12-14
dyfdiytdu