Hi there xxhe,
and a warm welcome to these forums. 
this...
Code:
refresh=date.lastModified();
...should be...
Code:
refresh=document.lastModified;
Note that language="JavaScript" is a deprecated attribute, use type="text/javascript" instead.
It is also advisable to use a DOCTYPE as a matter of habit.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Exercise 1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>Compilation of Part I Exercises</h1>
<hr>
<script type="text/javascript">
<!--
refresh=document.lastModified;
now=new Date();
deadline=new Date("July 08 2006 00:00:00");
time_remaining=(((deadline - now)/1000)/60)/60; //hours
document.write("<h2>I worked on this date: " + refresh + "<\/h2>");
document.write("<p>Time remaining to complete this course: " + time_remaining + "<\/p>");
//-->
</script>
<hr>
</body>
</html>
coothead
Bookmarks