打开网页时,弹出小窗口,N秒后自动关闭。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <script> var newwin = window.open("pop.html","","width=300,height=200"); setTimeout("newwin.window.close()",3000); </script> <body> 主页fdgdfgdfgdfgfdg </body> </html>
pop.html 是要弹出的窗口文件。