DOM Object: Element
|
Properties & Methods |
Functional Description |
Data |
Test Case |
|---|---|---|---|
| tagName | name of the element | BODY | cele001.html |
| getAttribute() | retrieves attribute value by name | #000fee | cele002.html |
| setAttribute() | sets an existing attribute's value | #00aa00 | cele003.html |
| removeAttribute() | removes an attribute by name | Attribute removed | cele004.html |
| getAttributeNode() | retrieves an ATTR node by name | bgcolor | cele005.html |
| setAttributeNode() | sets an existing ATTR node | bgcolor | cele006.html |
| removeAttributeNode() | removes the specified attribute | Attribute Node removed | cele007.html |
| getElementsByTagName() | Returns a NODELIST of all descendant elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the ELEMENT tree. | PRE | cele008.html |
| normalize() | puts all TEXT nodes in the the full depth of the sub-tree underneath this Element into a "normal" form where only markup (e.g., tags, co9mments, processing instructions, CDATA sections, and entitiy references) separates TEXT nodes, i.e., there are no adjacent TEXT nodes. | Unsure how to test this... |
cele009.html |