Javascript Clock This clock was written in javascript. Not only does it tell the time, but also the date!
Код скрипта
<script language="javascript">
<!-- Clock in Java Script .. Benny Sparano
// http://chelsea.ios.com/~benny3/ benny3@chelsea.ios.com
var dateform
speed=1000
len=28
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>
</head>
<body>
<BODY BGCOLOR="#FFFFFF">
<font size=+1> Javascript Clock</h3>
This clock was written in javascript. Not only does it tell the time, but also the date!
<p>
<!--
<ul>
<li> <b>mesg</b> The message!
<li> <b>len</b> The size of the form to create the ticker tape (<i>size=</i> in a FORM input field), and
<li> <b>speed</b> how fast (in millli seconds?) to scroll.
</ul>
-->
<script language="javascript">
// You need a javascript compatible browser to view the following <br>
Clock();
// end javascipt section <br>
</script>