dom|w3c| Create | dynamic
Properties/Methods |
Describe |
Document.createelement (TagName) |
The CreateElement method on a Document object can create elements that are specified by tagname. If a string div is used as a method argument, a DIV element is generated |
document.createTextNode (text) |
The createTextNode method of the Document object creates a node that contains static text. |
<element>.appendchild (Childnode) |
The AppendChild method adds the specified node to the list of child nodes of the current element (as a new child node). For example, you can add an option element as a child of a SELECT element. |
<element>.getattribute (name) <element>.setattribute (name) |
These methods get and set the value of the Name property in the element, respectively. |
<element>.insertbefore (Newnode,targetnode) |
This method inserts the node newnode as a child of the current element in front of the targetnode element. |
<element>.removeattribute (name) |
This method deletes the attribute name from the element. |
<element>.replacechild (Newnode,oldnode) |
This method replaces the node OldNode with the NewNode node. |
<element>.haschildnodes () |
This method returns a Boolean value indicating whether the element has child elements. |
<element>.clonenode (True) |
Clones the current element and returns a new element |