Home > Web Front-end > JS Tutorial > body text

jquery find tr td example simulation_jquery

WBOY
Release: 2016-05-16 16:49:24
Original
1033 people have browsed it

Someone suddenly asked me in the group today why the statement $("#MainContent_GridView1").closest("tr").children("td:eq(1)").text() cannot find the value. I asked him whether to take the text of the td of eq(1) under a tr or all of them. He said everything. . . . Then you must loop through all tr ​​and then find td among them. . .

Here I write a simple blog to help those friends who still don’t know how to use jquery selectors.

I simulated a table for your reference. The following is the html structure

Copy code The code is as follows:





< td>2


;td>22








1 3
33
111 222 333


//I introduced the local jquery file, but I will not introduce it in the article.



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!