Suppose we already have a DOM object whose content is as follows:Content
In JavaScript, we generally need to do this to obtain the title label and text.VaR Title = Dom. getelementsbytagname ("title ");Alert (title [0]. nodename); // obtain
In JavaScript, you can use the childnodes attribute to return an array containing all the subnodes of a given element node, as shown in figureCodeAs shown in: Flat view printing?
01
Body>
02
Ul ID="Action">
1. nodename attribute: name of the node.If the node is an element node, the name of the element is returned. In this case, it is equivalent to the tagname attribute. For example, AAAA : returns p.If it is an attribute node, nodename returns the
Html dom nodeName nodeValue, nodenamenodevalue
In javascript, we generally need to do this to obtain the title label and text.Var obj = document. getElementsById ("id1 ");Obj. nodeName; // obtain the tag name.Obj. nodeValue; // IE returns null.
It
3. view the text
View the body, that is, the server receives the ID number sent from the Flash end, queries the database based on the ID number, and returns the query result to the Flash end in XML format.
A. Passed XML
1. Request Message
ID of
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
//
Preface
We cannot face the fact that many programmers do not plan their JS Code. We often write code, run, and submit quickly. However, when we continue to develop variables and functions, we have to go back and view their meanings again. The
Preface
We cannot face the fact that many programmers do not plan their JS Code. We often write code, run, and submit quickly. However, when we continue to develop variables and functions, we have to go back and view their meanings again. The
The simplest case for reading XML in PHP:
The XML file (Cy.xml) is as follows:
Copy CodeThe code is as follows:
1
2
3
The php file (cy.php) is as follows:
Copy CodeThe code is as follows:
The simplest scenario for reading XML in PHP:
The XML file (Cy.xml) is as follows:
Copy Code code as follows:
1
2
3
The php file (cy.php) is as follows:
Copy Code code as follows:
$xml = new
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.