top of page

Java Script program to find simple interest

  • Writer: Rajesh Singh
    Rajesh Singh
  • Oct 3, 2021
  • 1 min read


<html>

<head>

<title> form event</title>

<script language="javascript">

function si(fnm)

{

P=fnm.t1.value

R=fnm.t2.value

T=fnm.t3.value

fnm.t4.value=(P*R*T)/100

}

</script>

</head>

<body>

<form>

<br>

Enter Principle Amount

<input type="text"name="t1">

<br><br>

Enter Rate of Interest

<input type="text"name="t2">

<br><br>

Enter the Time Period

<input type="text"name="t3">

<br><br>

<input type="button"name="b1"value="Simple Interst" onclick="si(form)">

<br><br>

simple interest

<input type="text" name="t4">

</form>

</body>

</html>


Output:



Recent Posts

See All
Switch Statement in Java Script

Switch Statement: A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case...

 
 
 

Comments


bottom of page