Status Bar Digital ClockCheck out the Time in the Status Line at the bottom left. This example is almost identical to the time example we saw when we looked at when we discussed the ternary operator. (Previous Example explained) <SCRIPT> function showTime() { var timeStr = "" + ((hours > 12) ? hours - 12 : hours); timeStr += ((minutes <
10) ? ":0" :
":") + minutes; status = timeStr; // time is displayed in the Status Line setTimeout("showTime()",
1000); </SCRIPT> <BODY onLoad="showTime()"> |