日期:2014-05-16 浏览次数:20401 次
function control_Onchange(control) {
var td = this.parentNode;
var td = control.parentNode; //得到该控件所在的td
var tr = td.parentNode; //得到tr
var ex_allowance = $($(tr).children('td').eq(1).children('input').eq(0)).text();
alert(ex_allowance);
return;
}
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table id="tb1">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:TextBox ID="txtEx_allowance" onblur="control_Onchange(this)" runat="server" Width="40"></asp:TextBox>
</td>
<td><asp:TextBox ID="txtNon_fixed_allowance" runat="server" Width="40"></asp:TextBox></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>