<HTML>
<HEAD>
<SCRIPT LANG="JavaScript">

function countDown (tick)
	{
	if (tick == 0)
		{
		window.location.href="http://www.altavista.com" ;
		return;
		}
	var time = "1 minute to go - " ;
	var minute = Math.floor(tick / 60);
	if (minute < 10)
		{
		time += "0";
		}
	time += minute + ":";
	var second = tick % 60;
	if (second < 10)
		{
		time += "0";
		}
	time += second;
	window.status = time;
	-- tick;
	var command = "countDown (" + tick + ")";
	window.setTimeout(command,1000);
	}

</SCRIPT>
</HEAD>
<BODY ONLOAD="window.setTimeout ('countDown(60)',1000) ; " BGCOLOR="#FFFFFF">
</BODY>
</HTML>
Published in: JavaScript
Download

Related snippets