1
2<html>
3<head>
4<title>(Type a title for your page here)</title>
5<script type="text/javascript">
6function display_c(){
7var refresh=1000; // Refresh rate in milli seconds
8mytime=setTimeout('display_ct()',refresh)
9}
10
11function display_ct() {
12var x = new Date()
13document.getElementById('ct').innerHTML = x;
14display_c();
15 }
16</script>
17</head>
18
19<body onload=display_ct();>
20<span id='ct' ></span>
21
22</body>
23</html>
1function display_ct() {
2var x = new Date()
3var x1=x.getMonth() + 1+ "/" + x.getDate() + "/" + x.getYear();
4x1 = x1 + " - " + x.getHours( )+ ":" + x.getMinutes() + ":" + x.getSeconds();
5document.getElementById('ct').innerHTML = x1;
6display_c();
7 }