|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
here is the code for a dynamic code for a clock, i find it pretty usefull.
<script language="JavaScript"> var timerID = null var timerRunning = false function stopclock(){ if(timerRunning) clearTimeout(timerID) timerRunning = false } function startclock(){ // Make sure the clock is stopped stopclock() showtime() } function showtime(){ var now = new Date() var hours = now.getHours() var minutes = now.getMinutes() var seconds = now.getSeconds() var timeValue = "" + ((hours > 12) ? hours - 12 : hours) timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours >= 12) ? " P.M." : " A.M." document.sss.face.value = timeValue //document.write (timeValue) timerID = setTimeout("showtime()",1000) timerRunning = true } </script> <form name = "sss"> <INPUT TYPE="text" NAME="face" SIZE=12 VALUE ="" border="-1"> </form> i found it sometime ago, so thanks to whoevers code this was. ![]()
__________________
"Morgoth i Cried All Hope is Gone But i Swear REVENGE Hear my Oath!!" |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Dynamic Clock on your Page... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|