-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLab1.html
More file actions
28 lines (21 loc) · 690 Bytes
/
Copy pathLab1.html
File metadata and controls
28 lines (21 loc) · 690 Bytes
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
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<h1>Hello and Welcome to the Jungle</h1>
<p>Input Width</p>
<input id="Width" type="text">
<p>Input Height</p>
<input id="Height" type="text">
<button onclick="CalculateDimensions()">Calculate</button>
<p>Output for Room Dimensions</p>
<p id="Output"></p>
<script>
function CalculateDimensions(){
var width = document.getElementById("Width");
alert(width.value);
var height = document.getElementById("Height");
alert(height.value);
var output = document.getElementById("Output");
$("#Output").text(height.value * width.value);
}
</script>