You are here: irt.org | FAQ | JavaScript | Date | Q1479 [ previous next ]
Have an image and change the source:
<script language="JavaScript"><!-- function showTime() { if (!document.images) return; now = new Date(); document.images["theTime"].src = 'http://tycho.usno.navy.mil/cgi-bin/xbmclock.xbm?zone=GMT&'+ now.getTime(); setTimeout('showTime()',60000); // update once a minute or they will be cross... } //--></script> <img name="theTime" src="http://tycho.usno.navy.mil/cgi-bin/xbmclock.xbm?zone=GMT" width=192 height=28>
More info (timezone and such) at http://tycho.usno.navy.mil/howclock.html