PDA

View Full Version : How to create a script is automatic transfer to another page??


mampwamp
09-16-2010, 11:29 PM
How to create a script is automatic transfer to another page??

example the current page is page 1 (home page), it will automatic transfer to page2 (about page) without clicking any menu in 2 second.

how to do that? is javascript??:mrgreen:

edbr
09-17-2010, 01:15 AM
yes you can do this javascript and set the time for the action

edbr
09-17-2010, 01:18 AM
from javascriptkit
<form name="redirect">
<center>
<font face="Arial"><b>You will be redirected to the script in<br><br>
<form>
<input type="text" size="3" name="redirect2">
</form>
seconds</b></font>
</center>

<script>
<!--

/*
Count down then redirect script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

//change below target URL to your own
var targetURL="http://javascriptkit.com"
//change the second to start counting down from
var countdownfrom=10


var currentsecond=document.redirect.redirect2.value=co untdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL
return
}
setTimeout("countredirect()",1000)
}

countredirect()
//-->
</script>