-
Notifications
You must be signed in to change notification settings - Fork 1
/
index_2_fun.html
45 lines (41 loc) · 1.3 KB
/
index_2_fun.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/styel2_fun.css">
<script src="js/code2_fun.js"></script>
<title>The area of rectangular</title>
</head>
<body>
<script type="text/javascript">
function calculate() {
var l = document.getElementById("length").value;
var w = document.getElementById("Width").value;
var res = Number(l) * Number(w);
document.getElementById("ans").innerHTML = "Calculater Area of Rectangular =" + res;
// window.alert("The area =" + res)
}
</script>
<table>
<tr>
<td class="td1" colspan="2"><h3>Calculater Area of Rectangular</h3></td>
</tr>
<tr>
<td><h3>Length</h3></td>
<td><Input type="text" id="length"></Input></td>
</tr>
<tr>
<td><h3>Width</h3></td>
<td><Input type="text" id="Width"></Input></td>
</tr>
<tr>
<td class="td3" colspan="2"><button type="button"onclick="calculate()">Calculater Area</button></td>
</tr>
<tr>
<td colspan="2"><p id="ans"> </p></td>
</tr>
</table>
</body>
</html>