Exemplu: "Acum este Sâm Iul 23, 2011 16:34:28" (iar ceasul sa fie dinamic - adica sa mearga minutele/secundele etc. fara sa dau refresh)
Cu acest script se poate face ?
Cod: Selectaţi tot
<script type="text/javascript">
function UR_Start()
{
UR_Nu = new Date;
UR_Indhold = showFilled(UR_Nu.getHours()) + ":" + showFilled(UR_Nu.getMinutes()) + ":" + showFilled(UR_Nu.getSeconds());
document.getElementById("ur").innerHTML = UR_Indhold;
setTimeout("UR_Start()",1000);
}
function showFilled(Value)
{
return (Value > 9) ? "" + Value : "0" + Value;
}
</script>