带有简单jquery VAT的字符script1014(在IE中)无效

时间:2012-09-18 09:46:21

标签: javascript jquery html

试图让这个代码解雇但是我一直在控制器错误引用代码的最后一行,但对我来说似乎很好,已经测试了不同的组合但是无济于事,任何人都有任何见解:)

<script type="text/javascript" charset="UTF-8">
    $("#txtModalPricesIncPrice").keyup(function() {

        var price = $(this).val();
        var VAT = (parseFloat($("#txtModalPricesVAT").attr("value"))/100)+1;
        $("#txtModalPricesExPrice").val(price / VAT);


    });

    $("#txtModalPricesExPrice").keyup(function() {

        var price = $(this).val();
        var VAT = (parseFloat($("#txtModalPricesVAT").attr("value"))/100)+1;

        $("#txtModalPricesIncPrice").val(price * VAT);

    });

    $("#txtModalPricesVAT").keyup(function() {

        var price1 = $("#txtModalPricesIncPrice").val();
        var price2 = $("#txtModalPricesExPrice").val;
        var VAT = (parseFloat($("#txtModalPricesVAT").attr("value"))/100)+1;

        $("#txtModalPricesIncPrice").val(price1 * VAT);
        $("#txtModalPricesExPrice").val(price2 / VAT);

    });
</script>

表格代码如下

<table class="table table-bordered">
            <thead><th></th><th></th></thead>
            <tbody>
            <tr>
                <td>Product ID: </td>
                <td><asp:Label ID="txtModalPricesProductID" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Description: </td>
                <td><asp:Label ID="txtModalPricesDesc" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Price Level: </td>
                <td><asp:Label ID="txtModalPricesPriceLevel" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>VAT:</td>
                <td><asp:Label ID="txtModalPricesVAT" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Sales Unit: </td>
                <td>
                    <asp:DropDownList ID="dropdownPLvlSalesUnit" runat="server" AutoPostBack="true"></asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>Quantity: </td>
                <td><asp:Label ID="txtModalPricesQuantity" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Inc. Price: </td>
                <td><input ID="txtModalPricesIncPrice" name="txtModalPricesIncPrice" runat="server" /></td>
            </tr>
            <tr>
                <td>Ex. Price: </td>
                <td><input ID="txtModalPricesExPrice" name="txtModalPricesExPrice" runat="server" />
                </td>
            </tr>
            <tr>
                <td>Profit: </td>
                <td><asp:Label ID="txtModalPricesProfit" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Margin: </td>
                <td><asp:Label ID="txtModalPricesMargin" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td>Target:</td>
                <td><asp:Label ID="txtModalPricesTarget" runat="server"></asp:Label></td>
            </tr>
            </tbody>
            </table>

0 个答案:

没有答案