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

text — NN 2 IE 3 DOM 1

Synopsis

The text object is a form control generated with an INPUT element whose TYPE attribute is set to "text". This object is the primary way of getting a user to enter single lines of text for submission to the server.

HTML Equivalent

<INPUT TYPE="text">

Object Model Reference

NN

[window.]document. formName . elementName

[window.]document.forms[i].elements[i]

IE

[window.]document. formName . elementName

[window.]document.forms[i].elements[i]

[window.]document.all. elementID

Properties

accessKey

form

offsetHeight

parentElement

style

className

id

offsetLeft

parentTextEdit

tabIndex

dataFld

isTextEdit

offsetParent

readOnly

tagName

dataSrc

lang

offsetTop

recordNumber

title

defaultValue

language

offsetWidth

size

type

disabled

maxLength

outerHTML

sourceIndex

value

document

name

outerText

  

Methods

blur( )

getAttribute( )

removeAttribute( )

click( )

handleEvent( )

scrollIntoView( )

contains( )

insertAdjacentHTML( )

select( )

createTextRange( )

insertAdjacentText( )

setAttribute( )

focus( )

  

Collections/Arrays

all[]

children[]

filters[]

Event Handler Properties

Handler

NN

IE

DOM

onblur

2

3

n/a

onchange

2

3

n/a

onclick

n/a

4

n/a

ondblclick

n/a

4

n/a

onfocus

2

3

n/a

onhelp

n/a

4

n/a

onkeydown

4

4

n/a

onkeypress

4

4

n/a

onkeyup

4

4

n/a

onmousedown

n/a

4

n/a

onmousemove ...

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