6 - Javascript:Objects - Assignment

Create a page that uses the Date object to display the weekday, date, and time. Display the information like this: "Sunday, July 11, 2004 13:20"

Also have a form that the user can enter an email address and phone number into. Use the String object to determine if the email address is valid by checking for the @ sign, ensuring that the TLD of the address is .com. For instance, "a@somewhere.org", "ab.com", and "blah" are all invalid. If the address is invalid, open an alert asking the user to re-enter it.

In the field for the phone number, ask the user to enter a value like 3192321234. with no dashes or spaces. Check that the information is entered like this, using only numbers.

Also, if either field is left empty, alert the user to enter the missing information.

This due by the beginning of class in week 7.

I'll have a jump drive you can save it to, or you can email me the page.

50 points.

Table of Contents