se devi solo fare un contatore allora:
Questo è la aprte html dove si visualizzerà il cronometro:
<input type="text" id="cronometro" readonly="readonly" value="0" />
Questa è la parte Javascript:
Codice PHP:
function cronometroGo()
{
var elem = document.getElementById("cronometro");
var value = parseInt(elem.value);
if(value >= 1000)
clearInterval(interval);
value = value + 1;
elem.value = value;
}
var interval = null;
window.onload = function(){
interval = setInterval(cronometroGo, 1000);
}