What we're talking about here is that all child nodes of the get element node include both the element child node and the text node.Or take a code instance of a blog postAnalysis: Do you like the city Beijing Tianjin Shanghai Chongqing
It is not difficult to realize that the core content of the optimized statement execution is the processing of various scheduling nodes from the optimized statements described earlier, and because of the design of node representation, recursive
Core of DOM: NodeBecause Dom is a tree structure, a node is abstracted as an object node, which is the core object of DOM:There are 12 types of nodes, which are determined by the value of node. nodetype (1-12: JS
Code
Node. element_node (1)
three ways to use JS1. Directly in the HTML tag, using the event properties, invoke the JS code: Point me! 2. From anywhere on the page, use the script tag3. External: Use the script tag src attribute to select an external address, type attribute
I. Element Node // test element node, output node name, node type, and node value varliElementsdocument. getElementsByTagName (& quot; li & quot;); for (vari0; I & lt; liElements. length; I ++) {alert (liElements [I]. nodeName);
I. Element nodes
//
One, Element node
Copy Code code as follows:
Test element node, output node name, node type, node value
var lielements=document.getelementsbytagname ("Li");
for (Var i=0;ialert (lielements[i].nodename);
alert
Php array tool Class PHP two-dimensional array deduplication function & lt ;? Phpfunctionunique_array_2d ($ array2D, $ stkeepfalse, $ ndformattrue) {judge whether to retain the primary array key (the primary array key can be non-numeric) if ($
Ext. Data. Tree
Inherited from observable, used to store the data structure of the tree
MethodTree ([node root])Use root as the root to construct the Ext. Data. Tree object
Getnodebyid (string ID): NodeGet the node by the specified ID
0x01: Previous WordsThe DOM can depict any HTML as a structure composed of multiple nodes. The nodes are divided into 12 different types, each representing different information and tags in the document. Each node has its own characteristics, data,
Ext. Data. Tree
Inherited from observable, used to store the data structure of the tree
MethodTree ([node root])Use root as the root to construct the Ext. Data. Tree object
Getnodebyid (string ID): NodeGet the node by the specified ID
Getrootnode ()
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.