<html>
<head>
<title>the date</title>
<script type = "text/javascript">
var started = new Date();
var now = started.getTime();
</script>
</head>
<body>
<p id="dateField"></p>
<script type = "text/javascript">
var bottom = new Date();
var diff = (bottom.getTime() - now)/1000;
var finaltime = diff.toPrecision(5);
var dateLoc = document.getElementById("dateField");
dateLoc.innerHTML = "Time: " + finaltime + " seconds.";
</script>
</body>
</html>
|