📄 dom_element.asp
字号:
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="prop_element_previoussibling.asp">previousSibling</a></td>
<td valign="top">Returns the node immediately before the element</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top">schemaTypeInfo</td>
<td valign="top">Returns the type information associated with the element</td>
<td valign="top"> </td>
<td valign="top"> </td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="prop_element_tagname.asp">tagName</a></td>
<td valign="top">Returns the name of the element</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="prop_element_textcontent.asp">textContent</a></td>
<td valign="top">Sets or returns the text content of the element and its
descendants</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="prop_element_text.asp">text</a></td>
<td valign="top">Returns the text of the node and its descendants.
IE-only property</td>
<td valign="top">5</td>
<td valign="top">No</td>
<td valign="top">No</td>
<td valign="top">No</td>
</tr>
<tr>
<td valign="top"><a href="prop_element_xml.asp">xml</a></td>
<td valign="top">Returns the XML of the node and its descendants. IE-only
property</td>
<td valign="top">5</td>
<td valign="top">No</td>
<td valign="top">No</td>
<td valign="top">No</td>
</tr>
</table>
<h3>Element Object Methods</h3>
<table border="1" width="100%" class="ex" cellspacing="0" id="table9">
<tr>
<th width="40%" align="left" valign="top">Method</th>
<th width="40%" align="left" valign="top">Description</th>
<th width="5%" align="left" valign="top">IE</th>
<th width="4%" align="left" valign="top">F</th>
<th width="4%" align="left" valign="top">O</th>
<th width="7%" align="left" valign="top">W3C</th>
</tr>
<tr>
<td valign="top"><a href="met_element_appendchild.asp">appendChild()</a></td>
<td valign="top">Adds a new child node to the end of the list of children of
the node</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_clonenode.asp">cloneNode()</a></td>
<td valign="top">Clones a node</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_comparedocumentposition.asp">compareDocumentPosition()</a></td>
<td valign="top">Compares the document position of two nodes</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_getattribute.asp">getAttribute()</a></td>
<td valign="top">Returns the value of an attribute</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_getattributens.asp">getAttributeNS()</a></td>
<td valign="top">Returns the value of an attribute (with a namespace)</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_getattributenode.asp">getAttributeNode()</a></td>
<td valign="top">Returns an attribute node as an Attribute object</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_getattributenodens.asp">getAttributeNodeNS()</a></td>
<td valign="top">Returns an attribute node (with a namespace) as an Attribute object</td>
<td valign="top">No</td>
<td valign="top"> </td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_getelementsbytagname.asp">
getElementsByTagName()</a></td>
<td valign="top">Returns a NodeList of matching element nodes, and their
children</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_getelementsbytagnamens.asp">getElementsByTagNameNS()</a></td>
<td valign="top">Returns a NodeList of matching element nodes (with a
namespace), and their children</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top">getFeature(feature,version)</td>
<td valign="top">Returns a DOM object which implements the specialized APIs
of the specified feature and version</td>
<td valign="top"> </td>
<td valign="top"> </td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top">getUserData(key)</td>
<td valign="top">Returns the object associated to a key on a this node. The
object must first have been set to this node by calling setUserData with the
same key</td>
<td valign="top"> </td>
<td valign="top"> </td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_hasattribute.asp">hasAttribute()</a></td>
<td valign="top">Returns whether an element has any attributes matching a
specified name</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_hasattributens.asp">hasAttributeNS()</a></td>
<td valign="top">Returns whether an element has any attributes matching a
specified name and
namespace</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_hasattributes.asp">hasAttributes()</a></td>
<td valign="top">Returns whether the element has any attributes</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_haschildnodes.asp">hasChildNodes()</a></td>
<td valign="top">Returns whether the element has any child nodes</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_insertbefore.asp">insertBefore()</a></td>
<td valign="top">Inserts a new child node before an existing child node</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top">isDefaultNamespace(URI)</td>
<td valign="top">Returns whether the specified namespaceURI is the default</td>
<td valign="top"> </td>
<td valign="top"> </td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_isequalnode.asp">isEqualNode()</a></td>
<td valign="top">Checks if two nodes are equal</td>
<td valign="top">No</td>
<td valign="top">No</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_issamenode.asp">isSameNode()</a></td>
<td valign="top">Checks if two nodes are the same node</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top">isSupported(feature,version)</td>
<td valign="top">Returns whether a specified feature is supported on the
element</td>
<td valign="top"> </td>
<td valign="top"> </td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_lookupnamespaceuri.asp">lookupNamespaceURI()</a></td>
<td valign="top">Returns the namespace URI matching a specified prefix</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_lookupprefix.asp">lookupPrefix()</a></td>
<td valign="top">Returns the prefix matching a specified namespace URI</td>
<td valign="top">No</td>
<td valign="top">1</td>
<td valign="top">No</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top">normalize()</td>
<td valign="top">Puts all text nodes underneath this element (including
attributes) into a "normal" form where only structure (e.g., elements,
comments, processing instructions, CDATA sections, and entity references)
separates Text nodes, i.e., there are neither adjacent Text nodes nor empty
Text nodes </td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
<td valign="top"><a href="met_element_removeattribute.asp">removeAttribute()</a></td>
<td valign="top">Removes a specified attribute</td>
<td valign="top">5</td>
<td valign="top">1</td>
<td valign="top">9</td>
<td valign="top">Yes</td>
</tr>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -