98Part IIJavaScript TutorialForm as object and (Web site translator) containerUnlike the
98Part IIJavaScript TutorialForm as object and containerUnlike the modern DOM s ID reference model which lets a script dive anywhere into a docu- ment to grab an element object reference DOM Level 0 form syntax imposes a hierarchicalapproach. It treats the formobject as a container whose contents consist of the form controlelement objects (input, select, and textareaelements). Figure 9-1 shows the structure ofthis hierarchy and its place relative to the documentobject. You ll see the effect this struc- ture has on the way you reference form control elements in a moment. This structure echoesperfectly the HTML tag organization within the
tag bookends. In addition to a large collection of properties and methods it has in common with all HTMLelement objects, the formobject features a number of items that are unique to this object. Almost all of these unique properties are scripted representations of the formelement sattributes. Scriptable browsers allow scripts to change these properties under script control, which gives your scripts potentially significant power to direct the behavior of a form sub- mission in response to user selections on the page. Figure 9-1:DOM Level 0 hierarchy for forms and controls. textradiobuttonformdocumentwindowselecttextareacheckboxpasswordsubmitresetoption
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision ecommerce web hosting services