O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

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

Name

FORM — NN 2 IE 3 DOM 1

Synopsis

The FORM object reflects the FORM element. The FORM object can be addressed in a reference either by the value assigned to its tag NAME attribute or by the index of the forms array contained by every document. To assemble a reference to a form control object, the FORM object must be part of the reference. This covers the eventuality that more than one form may be placed in a document.

HTML Equivalent

<FORM>

Object Model Reference

NN

[window.]document. formName

[window.]document.forms[i]

[window.]document.form[" formName "]

IE

[window.]document. formName

[window.]document.forms[i]

[window.]document.form[" formName "]

[window.]document.all. elementID

Properties

action

innerText

name

offsetWidth

sourceIndex

className

isTextEdit

offsetHeight

outerHTML

style

document

lang

offsetLeft

outerText

tagName

encoding

language

offsetParent

parentElement

target

id

length

offsetTop

parentTextEdit

title

innerHTML

method

   

Methods

click( )

insertAdjacentHTML( )

scrollIntoView( )

contains( )

insertAdjacentText( )

setAttribute( )

getAttribute( )

removeAttribute( )

submit( )

handleEvent( )

reset( )

 

Collections/Arrays

all[]

children[]

elements[]

filters[]

Event Handler Properties

Handler

NN

IE

DOM

onclick

n/a

4

n/a

ondblclick

n/a

4

n/a

ondragstart

n/a

4

n/a

onfilterchange

n/a

4

n/a

onhelp

n/a

4

n/a

onkeydown

n/a ...

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