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

Description

The <form>...</form> element primarily exists as a wrapper for all form elements on a page: check boxes, drop-down combo boxes, and so on. Typically, according to the W3C, these elements must be descendent elements of a form element.

Referencing a Form

There are several different ways to refer to a form in a document. One is, of course, the document.getElementById() method, with the first argument being the form's id attribute. (See Chapter 20, “Core DOM Objects,” for details.) However, several other approaches predate the DOM—many of which the DOM Level 1 adapts.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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