javascript Element applyElement( )
applyElement( ) | Firefox/Netscape/NN n/a IE 5(Win) Chrome/Safari/DOM n/a |
applyElement(elementObject[, type]) | |
Inserts a new element as either a child element of the current object or as the new parent of the current object, depending on the value of the second parameter. The default behavior is to wrap the current object with the new element. But you may also choose to insert the new element as a child element. In this case, if the current object is in the document tree (as opposed to simply floating in memory after being created with document.createElement( )) and already has child elements nested inside it, the newly applied element is inserted in such a way that the previous children become children of the inserted element (i.e., grandchildren of the current object). This wrapping behavior is unique among IE element insertion methods and can have significant impact on the document tree. Use with caution. |
|
Parameters | |
|
|
Returned Value | |
Reference to the newly added element object. |
Powered by Linode.