html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html PUBLIC-"//W3C//DTD XHTML1.1//EN"
"http://www.w3.org/1999/">
<html xmlns=" http://www.w3.org/1999/xhtml"xml:lang="en">
<head>
<title>Page Title</title>
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script type="text/javascript" src="hronom.js">
</script>
</head>
<body onload="Timer()">
<div>
<input type="text" size="5" id="clock"/>
</div>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
function Timer()
{
var date=new Date();
document.getElementById("clock").value= date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
setTimeout("Timer()",1000);
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run