下面的例子将确保弹出窗口获得焦点:
<html> <head> <script type="text/javascript"> myWindow=window.open('','','width=200,height=100'); myWindow.document.write("这是弹出的新窗口"); myWindow.focus(); </script> </head> <body> </body> </html>
0