This article illustrates how JavaScript implements automatic pop-up windows and closes Windows automatically. Share to everyone for your reference. Specifically as follows:
Here describes the JavaScript automatic pop-up window and automatically close the window, JS to achieve this effect seems very simple, open the page that shows a pop-up window, and then automatically leave, using the window.open and Document.open (); and Document.close (), objects together to achieve, now seems to use a little.
The effect is as shown in the following illustration:
The specific code is as follows:
<HTML> <HEAD> <TITLE> Auto-exit window </TITLE> <SCRIPT> <!--var flyingwin var popupwidth=200 var popupheight=150 var marginright var windowcenter var i_top=200 var i_left=-popupwidth-50 var step=40 var timer var Wai tingtime=5000 var pause=20 function ShowWindow () {Flyingwin = window.open ("", "Flyingwin", "toolbar=no,width=" +popupwid
th+ ", height=" +popupheight+ ", top=100,left=" + (-popupwidth) + "");
Flyingwin.document.open (); Flyingwin.document.write ("
The
wants this article to help you with your JavaScript programming.