Skip to content

Instantly share code, notes, and snippets.

@brayancruces
Forked from jomasero/redireccion.htm
Last active August 29, 2015 14:07
Show Gist options
  • Save brayancruces/08f7709dbe3bdb5aa0d4 to your computer and use it in GitHub Desktop.
Save brayancruces/08f7709dbe3bdb5aa0d4 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script>
var start=new Date();
start=Date.parse(start)/1000;
var counts=10;
function CountDown()
{
var now=new Date();
now=Date.parse(now)/1000;
var x=parseInt(counts-(now-start),10);
if(document.form1) { document.form1.clock.value = x; }
if(x > 0) {timerID=setTimeout("CountDown()", 100); }
else { location.href="http://norfipc.com"; }
}
window.setTimeout('CountDown()',100);
</script>
</head>
<body>
<form name="form1" id="form1">
Serás redireccionado en <input type="text" name="clock" size="2" value="10" />segundos
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment