Introduction to Computer Programming

Homework 4

In this exercise you will construct a very crude clock using the JavaScript "Date" object.

Assignment

Your goal is to create a simple but complete web page which contains the following:
  1. All the general structure of a web page that you've seen in previous assignments, using "HTML", "HEAD" and "BODY" tags (dont' forget to close them).
  2. A tab title (using the "TITLE" tag) which says simply "Clock 1".
  3. Text which says "The current time is ", followed by...
  4. A script which uses the JavaScript "Date" object to insert into the page a string representatation of the current date and time.
  5. Add to this page in the appropriate place a "META" tag which causes the page to refresh (reload) once every second.

Submission

The name of the file for this web page should be your first name, followed by the initial letter of your last name, followed by the two digits "04". The file extension should be ".html". So, for example, a student by the name of Emmy Noether would create a file called "EmmyN04.html".

To submit your assignment you should print a copy of the source code file, and print a copy of the resulting "output" (what it looks like in a browser). Staple the two together, with the ouput page on top, and put your name on the top of the first page.

You should also upload a copy of your file to http://www.EricMyers.com/student/dla/upload_hw.php