Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
index.html
<!DOCTYPE html>
<html>
<head>
<script>
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout(function(){startTime()},500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
</head>
<body onload="startTime()">
<header>
<nav>
<a href="index.html">Home</a> |
<a href="phpBB">Forums</a> |
<a href="mediawiki">mediawiki</a> |
<a href="dokuwiki">dokuwiki</a> |
<a href="mantisbt">bugs</a>
</nav>
</header>
<!--#include virtual="quote.txt" -->
<!--#echo var="https://www.google.com/" -->
<div id="txt"></div>
<!--#flastmod virtual="index.html" -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment