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

jquery method to get the contents of all tds in a row in the table_jquery

WBOY
Release: 2016-05-16 17:40:39
Original
1035 people have browsed it

Copy code The code is as follows:




                                                                🎜>                                       option value="-1" selected="selected">Please select a role 
  
; >
< /select>
                                                                                 .id);">Add
                                                                                                    /a>


14TopParty Offer


<script><br>function Bind(thisObj, thisObjID) {<br> alert("Bind");<br> var $td = $(thisObj).parents('tr').children(' td');<br> <br> // alert($td.eq(0).text()); //The content of the first td<br> <br>// alert($td.eq(1).text());//The content of the second td<br>// alert($td.eq(2).find("select"). val());//The selected value of the third td content<br>// alert($td.eq(3).find("select").val()); <p> var resourceBlockID = $td.eq(1).attr("id");//The value of the ID of the second Td, attr("id"); Get the Id value of the object<br> var roleId = $td.eq(2).find("select").val();<br> var operationId = $td.eq(3).find("select").val();<br> alert( "ResourceId" resourceBlockID);</p> alert("RoleId" roleId);<p> alert("Operation ID" operationId); </p> <p>var helptime = new Date().getTime();<br>}<br></script>


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!