The number of seconds after the automatic jump to other pages (JS script)
Method One:
To add JS between
Copy Code code as follows:
<script language= "JavaScript" >
var secs = 3; Number of seconds to Countdown
var URL;
function Load (URL) {
url = URL;
for (Var i=secs;i>=0;i--)
{
Window.settimeout (' doupdate (' + i + ') ', (secs-i) * 1000);
}
}
function doupdate (num)
{
document.getElementById (' Showdiv '). InnerHTML = ' will automatically jump to home page ' after ' +num+ ' seconds;
if (num = = 0) {window.location = URL;}
}
</script>
Then in <body> add <body onload= "Load (' index.asp ')" > index.asp for the page you want to jump.
Between <body></body> plus <div id= "Showdiv" ></div>
Method Two:
Copy Code code as follows:
<p style= "TEXT-INDENT:2EM; margin-top:30px; " >
The system will automatically jump to the new URL after <span id= "time" >5</span> seconds, if it fails to jump, <a href= "http://www.jb51.net" title= "click access" > Please click </a>. </p>
<script type= "Text/javascript" >
Delayurl ();
function Delayurl () {
var delay = document.getElementById ("Time"). InnerHTML;
var t = settimeout ("Delayurl ()", 1000);
if (Delay > 0) {
delay--;
document.getElementById ("Time"). InnerHTML = delay;
} else {
Cleartimeout (t);
Window.location.href = "Http://www.jb51.net";
}
}
</script>