Code for automatically redirecting to another address after certain time interval?

Kmandapalli
Posted by Kmandapalli under JavaScript category on | Points: 40 | Views : 509
<p><!--webbot bot="HTMLMarkup" startspan --><form name="redirect">
<center>
<font face="Arial"><b> After 5 Second . . .<br><br>
<form>
<input type="text" size="3" name="redirect2">
</form>
</b></font>
</center>

<script>
<!--

var targetURL="http://www.dotnetfunda.com"

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

countredirect()
//-->
</script>
<!--webbot bot="HTMLMarkup" endspan --></p>
</body>
</html>

<html>
<head>

<style>
.myStyle { writing-mode: tb-rl;
filter: flipH() flipV();
}
</style>


<base target="_blank">


</head>
<body>

<p align="center">

<span class="myStyle">
<font size="6" color="#000000">google.com</font>
</span>

</p>

</body>
</html>
<font face="Tahoma"><a target="_blank" href="http://www.dotnetfunda.com/"><span style="font-size: 8pt; text-decoration: none">DotNetFunda</span></a></font>

Comments or Responses

Login to post response