


Detailed analysis of the difference between children and find in Jquery_jquery
May 16, 2016 pm 05:11 PMFirst look at a piece of HTML code, as follows:
< ;table id="tb">
🎜> td>
</tr>
td>4</td>
/td>
</tr>
</table>
If I want to get the value of the second td in the second tr:
Copy code
Find :
Copy code
After checking the information, what is obtained through children is the subordinate elements of the element, and what is obtained through find is all the subordinate elements of the element.
The selector in children is to filter the two obtained tr elements according to the conditions, so the above writing method cannot get the value.
If we must use children, we can write it like this:
Copy the code

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Detailed explanation of jQuery reference methods: Quick start guide

How to use PUT request method in jQuery?

How to remove the height attribute of an element with jQuery?

jQuery Tips: Quickly modify the text of all a tags on the page

OPPO Find X7 is a masterpiece! Capture your every moment with images

Use jQuery to modify the text content of all a tags

OPPO Find X8 Ultra core configuration exposed! Snapdragon 8 Gen4+ Extra Large Battery

Understand the role and application scenarios of eq in jQuery
