(^568) Chapter 14 A Brief Look at JavaScript
input. Fix the errors so that the form does not submit if there is no input in the
Name input box. Correct the errors and describe the process you followed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
JavaScript Form Handling
Hands-On Exercises
1.Practice writing event handlers.
a. Write the XHTML tag and event handler to pop up an alert message that says
“Welcome” when the user clicks a button.
b. Write the XHTML tag and event handler to pop up an alert message that says
“Welcome” when the user moves the mouse pointer over a hypertext link that
says “Hover for a welcome message”.
c. Write the XHTML tag and event handler to pop up an alert message that says
“Welcome” when the user moves the mouse pointer away from a hypertext link
that says “Move your mouse pointer here for a welcome message”.
2.Create a Web page that will pop up an alert message welcoming the user to the
Web page. Use a script block in the <head>area for this task.