Forms and FormElementsMost interactivity between a Web page (Web site development)
Forms and FormElementsMost interactivity between a Web page and the user takes placeinside a form. That s where a lot of the interactive HTML stufflives for every browser: text fields, buttons, checkboxes, option lists, and so on. As described in earlier chapters, you may use the modern DOMdocument.getElementById()method to reference any element, including forms and form controls. But this chapter focuses on anolder, yet equally valid way of referencing forms and controls. It simportant to be familiar with this widely used syntax so that you canunderstand existing JavaScript source code written according to theoriginal (and fully backward-compatible) form syntax the so-calledDOM Level 0 syntax. The form ObjectUsing the original DOM Level 0 syntax, you can reference a formobject either by its position in the array of forms contained by a doc- ument or by name (if you assign an identifier to the nameattributeinside the