Predmet:Sat na vasoj stranici
PreuzmiIzvorni kôd (HTML):
<SCRIPT LANGUAGE="JavaScript">
function setSat() {
var vr = new Date();
var sat = vr.getHours();
var min = vr.getMinutes();
var sec = vr.getSeconds();
var Value = "" + ((sat >12) ? sat - 12 : sat)
Value += ((min < 10) ? ":0" : ":") + min
Value += ((sec < 10) ? ":0" : ":") + sec
Value += (sat>=12) ? " pm" : " am";
document.vrijeme.sat.value = Value;
setTimeout ("setSat()", 1000);
}
<BODY onLoad = "setSat()">
<INPUT TYPE="text" NAME="sat" VALUE="" SIZE=11>
Podrska samo putem foruma, jer samo tako i ostali imaju koristi od toga.