$(function () { $("[id*=txtQuantity]").keyup(function () { debugger; var price = parseFloat($("[id*=txtPrice]").val()); var Qnt = parseFloat($("[id*=txtQuantity]").val()); var total = parseFloat(price * qnt); $("[id*=lblPrice]").val(total); }); });
<tr bgcolor="#ececec" style="width: 50%"> <td class="style10" align="left"> <span style="font-family: 'Arial Narrow'; font-size: medium;" class="lblleabl"> Price</span> </td> <td class="style10" align="left"> <%-- <asp:TextBox ID="txtPrice" runat="server" class="Price"></asp:TextBox>--%> <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox> </td> </tr> <tr bgcolor="#ececec" style="width: 50%"> <td class="style10" align="left"> <span style="font-family: 'Arial Narrow'; font-size: medium;" class="lblleabl"> Quantity</span> </td> <td class="style10" align="left"> <asp:TextBox ID="txtQuantity" runat="server"></asp:TextBox> </td> </tr> <tr bgcolor="#ececec" style="width: 50%"> <td class="style10" align="left"> <span style="font-family: 'Arial Narrow'; font-size: medium;" class="lblleabl"> Total Price </span> </td> <td class="style10" align="left"> <%--<asp:Label ID="lblPrice" runat="server" Text=""></asp:Label>--%> <asp:TextBox ID="lblPrice" runat="server"></asp:TextBox> </td> </tr>
<pre>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)