se per caso può esservi utile ecco il codice:
<html>
<head>
<SCRIPT>
var interval = "";
var i = 20;//numero di secondi
function startInterval()
{
interval = window.setInterval("tTimer()",1000);
}
function stopInterval()
{
window.clearInterval (interval);
interval="";
}
function tTimer()
{
document.f.display.value = i--;
if (i == -1)
{
stopInterval();
location.href = "pag.html";
}
}
</SCRIPT>
</head>
<body>
<form name=f>
<input type=text name=display value="">
</form>
<script>
startInterval();
</script>
</body>
</html>