Availability: |
| ||||||
Inherits from: | Element object | ||||||
JavaScript syntax: | IE | myHTML = myDocument.all.anElementID | |||||
IE | myHTML = myDocument.all.tags("HTML")[0] | ||||||
IE | myHTML = myDocument.all.tags("HTML")[anIndex] | ||||||
IE | myHTML = myDocument.all[aName] | ||||||
IE | myHTML = myDocument.all[anIndex] | ||||||
- | myHTML = myDocument.documentElement | ||||||
- | myHTML = myDocument.getElementById(anElementID) | ||||||
- | myHTML = myDocument.getElementsByName(aName)[anIndex] | ||||||
- | myHTML = myDocument.getElementsByTagName("HTML")[anIndex] | ||||||
HTML syntax: | <HTML> ... </HTML> | ||||||
Argument list: | anIndex | A selector for one particular HTML element | |||||
aName | An associative array reference | ||||||
anElementID | The ID value of an Element object | ||||||
Object properties: | title, version | ||||||
Event handlers: | onClick, onDblClick, onHelp, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp |
This object is otherwise known as the HTML object.
The <HTML> tag is a block-level tag, although it cannot be placed inside any other tag. Like the body tag, it is considered to be a block-level tag on grounds of its behavior in a framed context.
Be careful how you operate on this object. Traversing its properties in a for( ... in ... ) loop can recursively lock up your browser.
The index value that points at this object in the all[] array for the document will be 0 if there is no DTD statement and 1 if there is. A correctly formed document should have a DTD statement. Use a dynamic mechanism for locating the object of type HTML instead of hardwiring the index value.
Property | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
title | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
version | 1.5
![]() | 5.0 ![]() | 6.0 ![]() | 5.0 ![]() | ![]() | ![]() | ![]() | 1 ![]() | ![]() | ![]() | ![]() |
Event name | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
onClick | 1.0 ![]() | 1.0 ![]() | 2.0 ![]() | 3.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onDblClick | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onHelp | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
onKeyDown | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onKeyPress | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onKeyUp | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseDown | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseMove | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseOut | 1.1 ![]() | 3.0 ![]() | 3.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseOver | 1.0 ![]() | 1.0 ![]() | 2.0 ![]() | 3.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseUp | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
Prev | Home | Next |
HTML file | Up | HTML.title |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |