-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.html
31 lines (31 loc) · 1.18 KB
/
script.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GPA Calculator</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<id id="calc-container">
<h2>GPA Calculator</h2>
<label for="num-classes">Number of Classes:</label>
<input type="number" id="num-classes" name="num-classes" min="1" max="10">
<button id="submit-btn" onclick="generateInputFields()">Submit</button>
<div id="class-inputs"></div>
<label for="gpa-option">Calculate:</label>
<select id="gpa-option" onchange="toggleCurrentGPAInput()">
<option value="current">Current GPA</option>
<option value="both">Both (Current & Cumulative)</option>
</select>
<div id="current-gpa-container" style="display: none;">
<label for="current-gpa">Enter current cumulative GPA:</label>
<input type="number" id="current-gpa" name="current-gpa" step="0.01" min="0" max="4">
</div>
<div id="gpa-result"></div>
</id>
</div>
<script src="./script.js"></script>
</body>
</body>
</html>