Script Categories













Date & Time >>> Time and Date 2.

This will show an updating clock and date in a small box.

Javascript Clock

This clock was written in javascript. Not only does it tell the time, but also the date!

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
var dateform
speed
=1000
len=42
tid = 0;

function dodate()
{
  f.date.value=new Date();
  tid=window.setTimeout("dodate()",speed);
}

function start(x) {
  f=x
  tid=window.setTimeout("dodate()",speed);
}

function cleartid() {
  window.clearTimeout(tid);
}

// for some reason on some pages this crashes netscape
function Clock()
{
document.write('<FORM name=dateform><input name=date size=')
document.write(len)
document.write(' value="Clock: Requires Javascript"></FORM>')
start(document.dateform);
}
// end-->

</script>
<h3><font size=+1> Javascript Clock</font></h3>
This clock was written in javascript. Not only does it tell the time, but also the date!

<script language="javascript">

// You need a javascript compatible browser to view the following <br>
Clock();
// end javascipt section <br>

</script>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

1хбет


©