//HTML
<table id="GVAnganwadi">
<tr>
<td>
<input type="text" class="firstName" value="foo1">
</td>
<td>
<input type="text" class="lastName" value="bar1">
</td>
</tr>
<tr>
<td>
<input type="text" class="firstName" value="foo2">
</td>
<td>
<input type="text" class="lastName" value="bar2">
</td>
</tr>
<tr>
<td>
<input type="text" class="firstName" value="foo3">
</td>
<td>
<input type="text" class="lastName" value="bar3">
</td>
</tr>
<tr>
<td>
<input type="text" class="firstName" value="foo4">
</td>
<td>
<input type="text" class="lastName" value="bar4">
</td>
</tr>
</table>
$(function () {
$("[id*=GVAnganwadi]
tr:has(td)").each(function () {
var
tt = $(this).children('td:eq(1)');
var
mm = tt.children(0).val()
alert(tt.children(0).val());
tt.children(0).css("background-color", "red");
});
});
//table
No comments:
Post a Comment