DOM nodeType Property介紹

剛好學到這個屬性,

HTML DOM nodeType Property:
http://www.w3schools.com/jsref/prop_node_nodetype.asp


擷取重點如下:

The nodeType property returns the node type, as a number, of the specified node.

--> If the node is an element node, the nodeType property will return 1.

--> If the node is an attribute node, the nodeType property will return 2.

--> If the node is a text node, the nodeType property will return 3.

--> If the node is a comment node, the nodeType property will return 8.

This property is read-only.



留言

熱門文章