Simple Interest calculator using HTML and JavaScript

Code:
<html>
    <head>
        <title>Simple interest</title>
        <script>
            function displynum()
            {
                simi.txt4.value=eval("("+simi.txt1.value+"*"+simi.txt2.value+"*"+simi.txt3.value+")"+"/"+"100");
            }
        </script>
    </head>
   
    <body>
        Simple Interest Calculator<br><br>
        <form name=simi>
            Principal amount<br>
            <input type=text name=txt1 style="text-align:right"><br><br>
            Number of year<br>
            <input type=text name=txt2 style="text-align:right"><br><br>
            Rate (per year)<br>
            <input type=text name=txt3 style="text-align:right"><br><br>
            <input type=button name=eqlbtn value="Submit" onclick="displynum()"><br>
            Simple Interest:
            <input type=text name=txt4 style="text-align:right"><br>

           
        </form>
    </body>
</html>
Result:

 
Simple interest Simple Interest Calculator

Principal amount


Number of year


Rate (per year)



Simple Interest:

Comments