<script> function display(hformat) { var thedate = new
Date(); var hours = thedate.getHours(); var Min =
thedate.getMinutes(); var Sec = thedate.getSeconds(); if
(hformat == 24) { var TimeV = "" + hours } else
{ var TimeV = "" + ((hours >12) ? hours -12
:hours) } TimeV += ((Min < 10) ? ":0" : ":") +
Min TimeV += ((Sec < 10) ? ":0" : ":") + Sec if (hformat !=
24) { TimeV += (hours >= 12) ? " P.M." : "
A.M." } window.status =
TimeV; str = "display("+hformat+")" timerID =
setTimeout(str,1000); } display(12); </script>
Demó:
Nézd a lenti Státuszbárt!
|