Appendix C. DOM Reference
This Appendix assembles all DOM methods and properties exposed by JavaScript. 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 child node to the element |
| Appends data (HTML or text) to a node; does not overwrite existing data |
| Removes the focus from the element |
| Simulates a click on the element |
| Creates a copy of the node (if deep is true, all subnodes are copied as well) |
| Deletes a number of characters from the data in a node |
| 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 |
| Returns a value that indicates whether the element has subnodes |
| Inserts a node before the element |
| Inserts data (HTML or text) at a certain position |
| Removes the given attribute and its value from the element |
|
Get Programming ASP.NET AJAX 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.