JavaScript/HTML
From DocForge
Quick reference [edit]
Document Functions [edit]
- document.getElementById(id)
- Returns an object reference to an element declared in the style of <div id="Tag"></div>
Elements [edit]
- element.getAttribute
- Retrieves an attribute in an HTML tag (e.g. getAttribute('style') )
- element.hasAttribute
- Returns true if an attribute exists.
- element.setAttribute
- Assigns an attribute to the element.
- element.removeAttribute
- Removes an attribute.
- element.innerHTML
- Allows retrieving or setting the inner content of the element.
|
|