Home > Articles > Open Source > Ajax & JavaScript

  • Print
  • + Share This
This chapter is from the book


If you want to study the form objects further, perform these exercises:

  • Change the validate function in Listing 12.3 so that after a message is displayed indicating that a field is wrong, the cursor is moved to that field. (Use the focus method for the appropriate form element.)

  • Add a text field to the form in Listing 12.3 for an email address. Add a feature to the validate function that verifies that the email address is at least five characters and that it contains the @ symbol.

  • + Share This
  • 🔖 Save To Your Account