各位大侠帮帮忙
<asp:Repeater ID="Repeater1" runat="server"><ItemTemplate>
<tr onkeyup="">
<td align="center" bgcolor="#FFFFFF" style="width: 112px">
<%#Eval("package")%>
</td>
<td align="center" bgcolor="#FFFFFF">
<asp:TextBox ID="TextBox1" runat="server" Width="60px" AutoPostBack="true"
OnTextChanged="TextBox1_TextChanged" onkeyup="txtsum(this.id)"></asp:TextBox>
</td>
<td align="center" bgcolor="#FFFFFF">
<asp:Label ID="Label2" runat="server" Text='<%#Eval("amount")%>'></asp:Label>
</td>
<td align="center" bgcolor="#FFFFFF">
<asp:Label ID="Label3" runat="server" Text='<%#Eval("xPrice")%>'></asp:Label>
</td>
<td align="center" bgcolor="#FFFFFF">
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
</td>
<td runat="server" align="center" bgcolor="#FFFFFF" style="width: 157px" id="tdbutton">
<asp:ImageButton runat="server" ID="ImageButton1" ImageUrl="../../image/product/pic7.jpg"
Width="138" Height="38" OnClick="ImageButton1_Click" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
我要当改变 TextBox1中的值时Label1的值也改变.Label1=TextBox1乘xPrice是固定值
--------------------编程问答-------------------- 给你基本思路:
<asp:TextBox ID="TextBox1" runat="server" Width="60px" AutoPostBack="true"
OnTextChanged="TextBox1_TextChanged" onkeyup="txtsum(this.value, <%#Container.ItemIndex%>)">
--------------------编程问答--------------------
function txtsum(val, trIndex){
$("#Repeater1").rows[trIndex].cells[6].innerHTML = val * price;
}
补充:.NET技术 , ASP.NET