Search HouseOfScripts.com

 

All Scripts        JavaScripts        ASP Scripts        Other Scripts

 

  Clock on Web Page asp, send, email, cdonts, link, recordset, hyper, hyperlink, create, list, box, dependant, dynamic

HEAD Section:

<script language="JavaScript">

<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var clockID = 0;

function UpdateClock() {
if(clockID) {
clearTimeout(clockID);
clockID = 0;
}

var tDate = new Date();

document.theClock.theTime.value = ""
+ tDate.getHours() + ":"
+ tDate.getMinutes() + ":"
+ tDate.getSeconds();

clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
if(clockID) {
clearTimeout(clockID);
clockID = 0;
}
}

//-->

</script>

BODY Section:

<body onload="StartClock()" onunload="KillClock()">
<center><form name="theClock">
<input type=text name="theTime" size=8>
<form></center>

Do you want to know how it works? Go to How to build Clock section.

 

 


Home       Scripts       Active WebTools       Web Templates       Forum       Tools        Hosting       Questions/Comments       Add/Request