Area of a parallelogram
<!DOCTYPE html>
<html>
<head>
<title>Area of a parallelogram</title>
</head>
<body>
<h3>Area of a parallelogram</h3>
<form name="f1">
Enter the height:- <input type="number" name="n1"><br>
Enter the base:- <input type="number" name="n2" ><br>
<input type="submit" value="Calculate" onclick="area()">
<input type="reset" value="Clear" alt="Clear the search form"><br>
Area :- <input type="number" name="n3" readonly>
</form>
<script type="text/javascript">
function area(){
event.preventDefault();
var h,b,a;
h = f1.n1.value;
b = f1.n2.value;
a = h*b;
f1.n3.value = ""+a;
}
</script>
</body>
</html>
Area of a parallelogram
Go back