• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 18. JavaScript and User Input > JavaScript and HTML Forms

JavaScript and HTML Forms

In the previous section, you saw a number of the DOM objects you can access and alter using JavaScript. In this section, we’re going to focus on one subset of the document object, the form object, and the various ways it can be manipulated.

The form Object

First, we should get the issue of multiple forms out of the way. In most cases, your forms will have names, thanks to the name attribute you use in the <form> element. If you give your form a name, as in name="myForm", you can easily access the elements of that form:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint