Copy codeThe Code is as follows: Row 1 column 1 Row 1 column 2 Row 2 column 1 Row 2 column 2
Children represents the child node array of the object -->
Document. all. tbl. children (0). children (0). Explanation of innerHTMLDocument.
Why does document. firstChild not find the html node or the firstchild text node?
DOM is developed for HTML4.01. We are now using XHTML1.0.
Therefore, to use attributes and methods in the core DOM, you must remove the DTD type definition.
new
element. FirstChild: Read-only property the first child nodeStandard: FirstChild will contain the text type of the nodeNon-standard: contains only ELEMENT nodeselement. Firstelementchild: Gets the child nodes of the first element type under the read-
A few days ago to test a small program, which needs to get the table in the first cell of a row of the value of the property, it is natural to use:
Tr.firstChild.getAttribute (' bill_id ');
This line of code executes correctly on the IE6, but there
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">
One Div > P >123p>div>In the above code, if you use the following JS codevar odiv=document.getelementbytagname ("div") [0];alert (oDiv.firstChild.nodeName)Below IE9, alert comes out is P (p tag name), but in modern browser, such as CHROME,FF,IE11
One Div > P >123p>div>In the above code, if you use the following JS codevar odiv=document.getelementbytagname ("div") [0];alert (oDiv.firstChild.nodeName)Below IE9, alert comes out is P (p tag name), but in modern browser, such as CHROME,FF,IE11
One
123
In the above code, if you use the following JS code
var odiv=document.getelementbytagname ("div") [0];
Alert (ODiv.firstChild.nodeName)
Below IE9, alert comes with P (p tag name), but in modern browsers, such as CHROME,FF,IE11, and
Reference: http://www.w3school.com.cn/jsref/prop_node_firstchild.aspDefinition and usageThe FirstChild property returns the first child node of the specified node, to the Node object.Note: In HTML, the text itself is the parent node of the HTML
123html Example 4789 Ten Oneqqqqq Awwww -yyyyyy -test1111 the - - $Panax NotoginsengThe above case in Google Chrome and IE is undefined, and print the Lastchildnode display is object text, because in the Advanced browser, the first and last
Firstchild,lastchild,nextsibling,previoussibling is supported under IEBut under FF, because it will be the space between the labels as a text node, so in order to accurately find the corresponding elements, will be
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
The following is a very simple HTML code that looks the same at both ends:{
This. style. display = 'none'; document. getelementbyid ('Code _ closed_text_110924 '). style. display = 'none'; document. getelementbyid ('Code _ open_image_110924 ').
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
In the past, when we established a tree structure in a relational database, we usually used ID + ParentID to implement the parent-child relationship between two records. However, this method can only indicate its relative position. Before the
The principle is basically like this. If strings are input, convert them into an element node. However, this element node can also have many layers and put the elements to be wrapped in the innermost layer. There are several methods to convert a
Imitating jquey and creating several package nodes, we found that jquery is inefficient. Next time, he could say how much these methods can be improved. The principle is basically like this. If strings are input, convert them into an element node.
Let's take a look at the functions of the Forum. you can log on to the Forum, view the topic, view the body, post a new topic, reply to the topic, delete the topic, and manage permissions. You can make some modifications based on your needs, you can
In daily webpage design, tables are one of the most commonly used html controls. For convenience and beauty, Easy appears. grid, this table is Easy to use, and the symbol is Easy.
Users only need to use html and Javascript, and read the Demo of Easy.
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.