DOM - Element

1 - About

When you want to do something to an element, first you need to select it.

A dom element is generally:

3 - Management

3.1 - Attribute

// Set
myImage.setAttribute ('src','images/firefox2.png');
// Get
var mySrc = myImage.getAttribute('src');

3.2 - Get


getElementsByName The document function document.getElementsByName(name) returns a NodeList collection of elements in the Document that have a name attribute with the value name in a case-sensitive manner, in tree order

3.3 - Child (Get|Add)

3.4 - Content (Get|Add|Update)

4 - Implementation

4.1 - Interface

The nodes representing HTML elements inherit their interface from the HTMLElement interface.

  • The HTMLElement interface holds methods and attributes related to a number of disparate features.
  • The HTMLUnknownElement interface is used for HTML elements that are not defined by the HTML specification.

5 - Documentation / Reference

markup/dom/element.txt ยท Last modified: 2017/09/16 12:19 by gerardnico