UNC
School of Information and Library Science
INLS760 – Web Databases, Spring 2011
INLS 760

Main Page

Announcements

Calendar/Notes

Assignments

Links

Course Policies

Grades

In-Class Exercise #6

Javascript

DOM

Write JavaScript code that uses the DOM creation functions such as createElement, createTextNode, and appendChild, to create a web page that, when a button is clicked, adds an H1 element that says "New List", and below that displays an unordered list of three text items: red, yellow, blue.

Form Validation

Create an HTML page with a form for a user to create a new "account". The form should have a field for the user to enter their email address and two password fields (password, and verify password).

Write Javascript code to verify that the email address has a "@" in it and that the two password fields match. If there are any errors, display a message to the right of the field as was shown in the example in class.