Name

A — NN n/a IE 4 DOM 1

Synopsis

The A object reflects the A element, regardless of whether the element is set up to be an anchor, link, or both. Navigator and Internet Explorer both treat this object as a member of the links[] and/or anchors[] arrays of a document. Internet Explorer 4 also lets you reference the object as a member of the document.all[] collection (array of all HTML elements).

HTML Equivalent

<A>

Object Model Reference

NN

[window.]document.links[i]

[window.]document.anchors[i]

IE

[window.]document.links[i]

[window.]document.anchors[i]

[window.]document.all. elementID

Properties

accessKey

id

nameProp

parentTextEdit

search

className

innerHTML

offsetHeight

pathname

sourceIndex

dataFld

innerText

offsetLeft

port

style

dataSrc

isTextEdit

offsetParent

protocol

tabIndex

document

lang

offsetTop

protocolLong

tagName

hash

language

offsetWidth

recordNumber

target

host

Methods

outerHTML

rel

title

hostname

mimeType

outerText

rev

urn

href

name

parentElement

  

Methods

blur( )

getAttribute( )

removeAttribute( )

click( )

insertAdjacentHTML( )

scrollIntoView( )

contains( )

insertAdjacentText( )

setAttribute( )

focus( )

  

Collections/Arrays

all[]

children[]

filters[]

Event Handler Properties

Handler

NN

IE

DOM

onblur

n/a

4

n/a

onclick

2

3

n/a

ondblclick

4

4

n/a

onfocus

n/a

4

n/a

onhelp

n/a

4

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.