english Dynamic Clock on homepage with Javascript

 

This little piece of Javascript, simply takes the computer-clock, and shows it in the desired format, size and font...
This script is on every pages on my website, so that visitors can view the clock at any time... (Look down in the right corner).
The smart thing about this script, is that the seconds also changes (every second :-), and with a little editing, the script can be used as countdown or for managing the time elsehow...

 

Here is the javascript to be included between <head> and </head>:

<script type="text/javascript">
function UR_Start() 
{
	UR_Nu = new Date;
	UR_Indhold = showFilled(UR_Nu.getHours()) + ":" + showFilled(UR_Nu.getMinutes()) + ":" + showFilled(UR_Nu.getSeconds());
	document.getElementById("ur").innerHTML = UR_Indhold;
	setTimeout("UR_Start()",1000);
}
function showFilled(Value) 
{
	return (Value > 9) ? "" + Value : "0" + Value;
}

</script>

Include this html code in the desired position on the webpage, where you want the clock to be shown:
- Notice that you can easily change the font, size and color...

<font id="ur" size="10" face="Trebuchet MS, Verdana, Arial, sans-serif" color="#DAD3B7"></font>

Change the <body>-tag to:

<body onload="UR_Start()">

 

Could You use this script? Please donate a little amount...



...to the development of more scripts :-)
Dynamisk ur på hjemmesiden med Javascript

Dynamic Clock on homepage with Javascript

Dynamische Uhr mit Javascript auf der Homepage

Dynamisk klokke på hjemmeside med JavaScript

Dynaaminen kello kotisivuille Javascriptin avulla

Une horloge dynamique en JavaScript sur votre page web

Dynamische klok op je Homepagina gemaakt met Javascript

Relógio dinámico numa página web com javascript

Ceas Dinamic pe homepage cu Javascript

Denne side på dansk Dynamisk ur på hjemmesiden med Javascript
Diese Seite auf Deutsch Dynamische Uhr mit Javascript auf der Homepage
Denne siden på norsk Dynamisk klokke på hjemmeside med JavaScript
Sivu suomi Dynaaminen kello kotisivuille Javascriptin avulla
Cette page en français Une horloge dynamique en JavaScript sur votre page web
Deze pagina in het Nederlands Dynamische klok op je Homepagina gemaakt met Javascript
Esta página em português Relógio dinámico numa página web com javascript
Aceasta pagina este in Româneşte Ceas Dinamic pe homepage cu Javascript  
 
Front page Read/sign my guestbook Sitemap Send mail  Bookmark and Share
Valid XHTML 1.0!