-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrade-calculator.html
More file actions
52 lines (43 loc) · 1.66 KB
/
grade-calculator.html
File metadata and controls
52 lines (43 loc) · 1.66 KB
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
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JCU Grade Calculator</title>
<link rel="stylesheet" href="styles.css">
<script src="grade-calculator-script.js" defer></script>
</head>
<body>
<main>
<h1>JCU Grade Calculator</h1>
<label for="year">Year:</label>
<input type="text" id="year" name="year" required>
<label for="subject-code">Subject Code:</label>
<input type="text" id="subject-code" name="subject-code" required>
<button onclick="searchSubject()">Search</button>
<label for="desired-grade">Desired Grade:</label>
<input type="text" id="desired-grade" name="desired-grade" placeholder="Enter P, C, D, HD or %">
<table id="grade-table">
<thead>
<tr>
<th>Item</th>
<th>Weighting (%)</th>
<th>Grade (out of 100%)</th> <!-- Updated header -->
<th>Remove</th> <!-- New header for removal button -->
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" class="item-input"></td>
<td><input type="number" class="weight-input"></td>
<td><input type="number" class="grade-input" placeholder="Enter % or x/y (e.g., 30/50)"></td>
<td><button onclick="removeRow(this)">-</button></td>
</tr>
</tbody>
</table>
<span id="error-message" style="color: red;"></span> <!-- Error message placeholder -->
<button onclick="addRow()">+</button>
<button onclick="calculateRest()">Calculate rest</button>
</main>
</body>
</html>