Name

COMMENT — NN n/a IE 4 DOM 1

Synopsis

The COMMENT object reflects the ! element. Most properties are not available or aren’t fully functional in the Macintosh version. Despite the presence of an id property, you cannot set an ID attribute in the HTML for a comment element.

HTML Equivalent

<!--comment text-->

Object Model Reference

IE

[window.]document.all.tags("!")[i]

Properties

className

isTextEdit

offsetParent

outerText

style

document

lang

offsetTop

parentElement

tagName

id

language

offsetWidth

parentTextEdit

text

innerHTML

offsetHeight

outerHTML

sourceIndex

title

innerText

offsetLeft

   

Methods

click( )

removeAttribute( )

setAttribute( )

getAttribute( )

  

Collections/Arrays

all[]

children[]

 

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.