GST Calculation in jQuery


GST Calculation in jQuery


 <!DOCTYPE html>

<html>

<body>

    <head>

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>

    </head>


    <h1>GST Calculation</h1>


    <form method="post" action="">

        <input type="hidden" name="mode" value="PinRequest" />

        <label><b>Fee</b></label>

        <input name="pages" id="pages" type="text"><br><br>

        <label><b>Total Amount</b></label>

        <input name="tot_amount" id="tot_amount" type="text">

        <input type="submit" name="save" value="submit">

    </form>

    <script>

        $(document).ready(function() {

            $('#pages').keyup(function(ev) {

                var total = $('#pages').val() * 1;

                var tot_price = total + (total * 0.18);

                var divobj = document.getElementById('tot_amount');

                divobj.value = tot_price;

            });

        });

    </script>

    <body>

</html>

Comments

Popular posts from this blog

C.R.U.D Oparetion in (PHP Code)

Search Dropdown - jQuery

JavaScript Form Validation Code