The example in this article tells jquery to get the table row number and output the cell contents. Share to everyone for your reference, specific as follows:
JS section:
<script language= "javascript" type= "Text/javascript" >
$ (function () {
$ ("#txtInput"). attr ("Value", " );
var v_temp = $ ("#lblMessage"). Text ();
alert (v_temp);
$ ("#txtInput01"). attr ("value", v_temp);
$ ("#div1"). Removeclass ("Div1");
$ ("#div1"). AddClass ("Divtest");
var flog = $ ("#div1"). Hasclass ("Divtest");
$ ("#div1"). HTML ("<input type= ' button ' id= ' id123 ' style= ' width:100px; height:150px ' > ');
var t01 = $ ("#table01 tr"). Length;
alert (t01);
$ ("#table01"). Find ("TD"). each (the function (i) {
var t = $ (this). text ();
Alert (t);
})
};
</script>
HTML section:
<form id= "Form1" runat= "Server" > <div> <input type= "text" id= "Txtinput" runat= "server" style= "font:" /> <br/> <asp:label id= "lblmessage" text= "I'm Testing" runat= "server" ></asp:Label> <br/> <i Nput type= "text" id= "txtInput01" runat= "server"/> <br/> <asp:textbox id= "TextBox1" runat= "Server" Wi Dth= "156px" ></asp:TextBox> <input type= "button" onclick= "Createxmlhttprequest ()"/>
Id= "TextBox2" runat= "Server" ></asp:TextBox> </div> <table id= "table01" border= "1px" ><tr> <td>11</td><td>11</td></tr> <tr><td>22</td><td>22</td ></tr> <tr><td>33</td><td>33</td></tr> <tr><td>44</ Td><td>44</td></tr> <tr><td>55</td><td>55</td></tr> </table> <div id= "Div1" class= "Div1" >
</div> </form>
More interested readers of jquery-related content can view the site topics: "JQuery table (table) Operation Tips Summary", "JQuery Operation Dom Node method summary", "JQuery Extended Skills Summary", "jquery common Plug-ins and Usage summary", " jquery drag-and-drop effects and tips summary, "jquery Ajax Usage Summary", "jquery common Classic Effects Summary", "jquery animation and special effects usage Summary" and "jquery Selector usage Summary"
I hope this article will help you with the jquery program design.