Common Methods in DOM objects

Source: Internet
Author: User
Appendchild Method
Add a node as the final sub-node of the specified node.

Attribute attribute
Returns the attribute list of the current node.

Childnodes attributes
Returns a node list that contains all available subnodes of the node.

Createelement Method
Creates an element with a specified name.

Createtextnode Method
Create a new text node and contain the specified data.

Documentelement attributes
Check the root node of the XML file.

Firstchild attributes
Confirm the first child element in the current node.

Getelementsbytagname Method
Returns the element set with the specified name.

Lastchild attributes
Confirm the final child element of the current node.

Nextsibling attributes
Return to the next sibling node in the subnode list of the current file node.

Nodename attribute
Returns a string that represents the name of the current node.

Nodetype attributes
Identifies the DOM type of a node.

NodEvalueAttribute
Returns the text related to the specified node. This is not a data value in an element, but a node-related and unparsed text, just like an attribute or a processing command.

Parentnode attributes
Returns the parent node of the current node. It can only be applied to nodes with a parent node.

Previussibling attributes
Returns the sibling node before the current node.

Removechild Method
The specified node is removed from the node list.

Selectsinglenode returns the first conforming node.
Returns the first conforming node.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.