Javascript| pop-up window
Pop-up window time delay source is as follows
-------------------------------
Script Description:
Add the following code to the <body> area
<script language=javascript>
<!--
function Mywin1 () {
Mywindow1 = window.open (' 8.htm ', ' myexample1 ', ' width=200,height=200 ');
Mywindow1.location.href = ' 9.htm ';
}
function Mywin2 () {
Mywindow2 = window.open (' 8.htm ', ' myexample2 ', ' width=200,height=200 ');
settimeout ("mywindow2.location.href = ' 9.htm '", 5000);
}
-->
</SCRIPT>
<table border=0 cellpadding=5 cellspacing=0 width=550>
<TBODY>
<tr bgcolor= #f3f3f3 >
<TD>
<P> The following code demonstrates how to first create a new window 8.htm and then quickly switch to another page 9.htm. </P>
<p><script language= "JavaScript" ><BR><!--<br>function
Mywin1 () {<br>mywindow1 =
window.open (' 8.htm ', ' myexample1 ', ' width=200,height=200 '); <br>mywindow1.location.href
= ' 9.htm ';<br>}<br>//--><br></script></p>
<p><input name=submit onclick=mywin1 () type=submit value= "See demo" >
</P>
<P> But the code above has little practical use because the window switches from 8.htm to 9.htm almost without any pauses, so it's more practical to make a little bit of a modification, plus a 5-second delay and then a page switch. 5000 represents 5 seconds, and the unit is milliseconds. </P>
<p><script language= "JavaScript" ><BR><!--<br>function
Mywin2 () {<br>mywindow2 =
window.open (' 8.htm ', ' myexample2 ', ' width=200,height=200 '); <br>settimeout ("Mywindow2.location.href
= ' 9.htm ', <font
color= #990099 >5000</FONT>);<br>}<br>//--><br></script></p>
<p><input name=submit2 onclick=mywin2 () type=submit value= "See demo" >
</P>
</TD></TR></TBODY></TABLE>