GST calculator html code -free html code - html code with java script - GST Calculator html code

We will try to give you a new code for every day . 
You can create your tool website and earn unlimited with google and google adsense. 
You can create your free website with the google product name as Blogger. 
You just open Blogger.com 
create your account and write or paste this code in the html view of your blogger. 

so the Code is given below you can copy and paste in your website . 

Here is a code for GST calculator online  



<html>

<head>

  <title>GST Calculator</title>

  <style>

    .container {

      width: 300px;

      margin: 0 auto;

    }

    

    .input-field {

      margin-bottom: 10px;

    }

  </style>

</head>

<body>

  <div class="container">

    <h2>GST Calculator</h2>

    

    <div class="input-field">

      <label for="amount">Amount:</label>

      <input id="amount" min="0" step="0.01" type="number" />

    </div>

    

    <div class="input-field">

      <label for="gstRate">GST Rate (%):</label>

      <input id="gstRate" min="0" step="0.01" type="number" />

    </div>

    

    <div class="input-field">

      <button onclick="calculateGST()">Calculate</button>

    </div>

    

    <div class="input-field">

      <label for="total">Total Amount (including GST):</label>

      <input id="total" readonly="" type="text" />

    </div>

    

    <div class="input-field">

      <label for="gstAmount">GST Amount:</label>

      <input id="gstAmount" readonly="" type="text" />

    </div>

  </div>

  

  <script>

    function calculateGST() {

      var amount = document.getElementById("amount").value;

      var gstRate = document.getElementById("gstRate").value;

      

      // Perform validation

      if (amount === "" || gstRate === "") {

        alert("Please enter an amount and GST rate.");

        return;

      }

      

      var gstAmount = (amount * (gstRate / 100)).toFixed(2);

      var total = (parseFloat(amount) + parseFloat(gstAmount)).toFixed(2);

      

      document.getElementById("total").value = total;

      document.getElementById("gstAmount").value = gstAmount;

    }

  </script>

</body>

Comments

Popular posts from this blog

बस माल पैक करो और कंपनी को वापस कर दो और 60 हजार रुपए महीना कमाओ, bindi packing business

3 ONLINE EARNING APP , NO CONDITION , NO INVESTMENT , ONLY EARNING , घर बैठे पैसा कमाने के लिए 3 सबसे बढ़िया APP .

हर महीने 27 लाख और सालाना 3 करोड़ 62 लाख की कमाई देने वाला बिज़नेस लागत भी है कम