1 Status Bar မွာ Digital Clock ထည့္မယ္ 29th December 2009, 2:54 pm
z3r0c00l
Administrator
Web Page Status Bar မွာ Digital Clock ေလးထည့္ရေအာင္။
- Spoiler:
<SCRIPT>
function showTime() {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var timeStr = "" + ((hours > 12) ? hours - 12 : hours);
timeStr += ((minutes < 10) ? ":0" : ":") + minutes;
timeStr += ((seconds < 10) ? ":0" : ":") + seconds;
timeStr += (hours >= 12) ? " Good Eveing" : " Good Morning";
status = timeStr; // time is displayed in the Status Line
setTimeout("showTime()", 1000);
}
</SCRIPT>
<BODY onLoad="showTime()">