Full version: jsB@nk » Time » Clock » Basic Clock script
URL: https://www.javascriptbank.com/basic-clock-script.html
This clock continuously updates without the use of a textbox. Easily position anywhere on your site. Cool!
Full version: jsB@nk » Time » Clock » Basic Clock script
URL: https://www.javascriptbank.com/basic-clock-script.html
<SCRIPT LANGUAGE="JavaScript">//Author Xavier R. ([email protected]) | http://www.lougaou.com///Modified by: Benjamin Wright, Editor<!-- Beginfunction clock() {if (!document.layers && !document.all) return;var digital = new Date();var hours = digital.getHours();var minutes = digital.getMinutes();var seconds = digital.getSeconds();var amOrPm = "AM";if (hours > 11) amOrPm = "PM";if (hours > 12) hours = hours - 12;if (hours == 0) hours = 12;if (minutes <= 9) minutes = "0" + minutes;if (seconds <= 9) seconds = "0" + seconds;dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;if (document.layers) {document.layers.pendule.document.write(dispTime);document.layers.pendule.document.close();}elseif (document.all)pendule.innerHTML = dispTime;setTimeout("clock()", 1000);}// End --></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<BODY onLoad="clock()"><span id="pendule"></span></body><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->