Appendix B. DOM Reference
This Appendix assembles all DOM methods and properties that JavaScript exposes. The DOM used is the W3C DOM supported by recent versions of Internet Explorer, Mozilla, Safari/Konqueror, and Opera. Methods and properties that are not supported by either of the two “main” browsers—Internet Explorer and Mozilla brands—are not mentioned.
Square brackets []
denote an array; parentheses ()
indicate a method.
Generic Methods and Properties
The methods and properties in this section exist for all DOM elements.
Methods
Method |
Description |
---|---|
|
Appends a node to the element |
|
Appends data to a node, not overwriting existing data |
|
Removes the focus from the element |
|
Simulates a click on the element |
|
Creates a copy of the node (if |
|
Deletes a number of characters |
|
Gives the focus to the element |
|
Returns the value of the given attribute |
|
Returns the node containing the given attribute |
|
Returns an array of all elements with the given tag name |
|
Whether the element has subnodes or not |
|
Insert a node before the element |
|
Inserts data at a certain position |
|
Removes the given attribute from the element |
Get Programming Atlas now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.