FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Scripts > Advance Clock





yule
Quote:
Creat an HTML page & put this code right in your HTML page



<html>
<head>
<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: Grea8man umaiirr@hotmail.com

var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

function startclock () {
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.clock.face.value = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
//-->

</script></head>
<body onLoad="startclock()">
<center>
<form name="clock" onSubmit="0">
<input type="text" name="face" size=12 value="">
</form>
</center></body></html>
B)
Related topics
[java scripts ] Multimedia
[ java scripts ] email service
Clock-javascript
Need script
[Scripts] PHP Clock
problem with internet explorer
free oclock
login systeem
php coding needed
Lock this thread - Make thumbnails for 15 frihs$
javascript clock
Disabling other scripts
How to speed up slow PC's?
In Command: The Windows Command Prompt
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.