javascript document createElement( )
createElement( ) | Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1 |
createElement("tagName") |
|
Generates in memory an instance of an element object associated with the tag passed as a parameter to the method. The method is limited to area, img, and option elements in IE 4; all elements are permitted in other supporting browsers. A newly created element has no attribute values assigned (except any default values assigned according to the DTD), nor is the element yet part of the document tree. Assign attributes (such as the type for an input element or id for any element), and append or insert the element into the document tree. This sequence is the W3C DOM approach to generating new content (in place of the innerHTML convenience properties implemented in IE and Netscape 6 browsers). |
|
Parameters | |
|
|
Returned Value | |
Element object reference. |
Powered by Linode.