O'Reilly logo

JavaScript Step by Step by Steve Suehring

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Using JavaScript with Web Forms

After reading this chapter, you'll be able to

  • Understand how to validate the input to a Web form using JavaScript.

  • Work with radio buttons, select boxes, and check boxes, both to get their values and set their state.

  • Provide feedback based on validation, both through an alert() dialog box and inline within the document.

  • Understand the limitations of JavaScript form validation and see an example of validation gone wrong.

JavaScript and Web Forms

JavaScript has been used with Web forms for a long time. JavaScript is commonly used to instantly verify that form fields have been filled in correctly before sending the form to the server. Prior to JavaScript, the form, and everything in it, needed to be sent to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required