quindi se vorrei fare un conteggio di un orario faccio così:
in un file esterno "js.js"
function orario(){
var data= new Date();
var ora=data.getHours();
var minuti=data.getMinutes();
var secondi=data.getSeconds();
var elemento= document.getElementById("valoreorario");
elemento.innerHTML=ora+":"+minuti+":"+secondi;
}
setInterval(orario(),1000);
file index.html
<script type/text/javascript" language="javascript" src="js.js"></script>
</head>
<body>
<span id="valoreorario"></span>
...
credi che va bene così????