js里获得GridView模板列的TextBox做批量增加的问题
例: gridview模板列分别有三个文本框TextBox1(基本),TextBox2(津贴),TextBox3(合计).现在我想在前台页面js里获得当用户输入后的这三个文本框的值然后再作实时计算。如果只是在页面上很简单.直接就TextBox3的onkeyup()事件里写个TextBox1和TextBox2之和的函数就是了。但现在的问题是我要在gridview模板列里去取这三个值,并且每一行都可以得到并计算。我试过这种方式去实现:
<asp:TemplateField HeaderText= "实发 ">
<ItemStyle HorizontalAlign= "Center " />
<ItemTemplate>
<asp:TextBox ID= "TextBox1 " runat= "server " BorderStyle= "None " Width= "55px " onkeyup= "getadd(this) "> </asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText= "应发 ">
<ItemStyle HorizontalAlign= "Center " />
<ItemTemplate>
<asp:TextBox ID= "TextBox2 " runat= "server " BorderStyle= "None " Width= "55px " onkeyup= "getadd(this) "> </asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText= "合计 ">
<ItemStyle HorizontalAlign= "Center " />
<ItemTemplate>
<asp:TextBox ID= "TextBox3 " runat= "server " &