Skip to content

Instantly share code, notes, and snippets.

@Schabernack
Created April 22, 2012 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Schabernack/2466201 to your computer and use it in GitHub Desktop.
Save Schabernack/2466201 to your computer and use it in GitHub Desktop.
Uhr
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Uhr</title>
</head>
<script type="text/javascript">
function getTime(){
date = new Date();
h = date.getHours();
m = date.getMinutes();
s = date.getSeconds();
document.getElementById('uhr').innerHTML = h + ":" + m + ":" + s;
}
</script>
<body onLoad="setInterval('getTime()',1000)">
<div id="uhr"/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment