Loan Interest rate calculator code -html code with java script - Free html code for

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 loan interest calculator online    




<head>

    <meta charset="UTF-8"></meta>

    <meta content="width=device-width, initial-scale=1.0" name="viewport"></meta>

    <title>Interest Rate Calculator</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            background-color: #f4f4f4;

            margin: 20px 0;

            padding: 20px;

            text-align: center;

        }


        h1 {

            color: #333;

            margin-bottom: 15px;

        }


        label {

            display: block;

            font-weight: bold;

            margin-bottom: 5px;

        }


        input {

            width: calc(100% - 16px);

            padding: 8px;

            border: 1px solid #ccc;

            border-radius: 4px;

            box-sizing: border-box;

            margin-top: 8px;

        }


        input[type="submit"] {

            width: 100%;

            padding: 10px;

            background-color: #4CAF50;

            color: white;

            border: none;

            border-radius: 4px;

            cursor: pointer;

        }


        #result {

            text-align: center;

            margin-top: 15px;

            font-weight: bold;

        }

    </style>

</head>

<body>

    <h1>Interest Rate Calculator</h1>

    <form id="interestRateCalculatorForm">

        <label for="loanAmount">Loan Amount:</label>

        <input id="loanAmount" placeholder="Loan amount" required="" type="number" />


        <label for="loanTenure">Loan Tenure (months):</label>

        <input id="loanTenure" placeholder="Loan tenure" required="" type="number" />


        <label for="monthlyInstallment">Monthly Installment:</label>

        <input id="monthlyInstallment" placeholder="Monthly installment" required="" type="number" />


        <input id="calculateBtn" type="submit" value="Calculate" />

    </form>

    <div id="result"></div>


    <script>

        document.getElementById('interestRateCalculatorForm').addEventListener('submit', function (event) {

            event.preventDefault();

            calculateInterestRate();

        });


        function calculateInterestRate() {

            var loanAmount = parseFloat(document.getElementById('loanAmount').value);

            var loanTenure = parseFloat(document.getElementById('loanTenure').value);

            var monthlyInstallment = parseFloat(document.getElementById('monthlyInstallment').value);


            var interestRate = ((monthlyInstallment * loanTenure) / loanAmount) * (12 / loanTenure) * 100;


            var resultElement = document.getElementById('result');

            resultElement.innerHTML = "Interest Rate: " + interestRate.toFixed(2) + "%";

        }

    </script>

</body>

</html>


Comments

Popular posts from this blog

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

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

घर बैठे करे पैकिंग का काम कमाए लाखो रूपये महीना , पॉपकॉर्न कंपनी दे रही है मौका