-
Notifications
You must be signed in to change notification settings - Fork 3
/
Bunk_calculator.html
99 lines (99 loc) · 3.51 KB
/
Bunk_calculator.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!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">
<title>Attendence</title>
<script language="javascript">
function fn(){
n = Number(document.getElementById("num1").value);
x = document.getElementById("Sub").value;
if(x == '1'){
t = Math.floor(59*0.2-n);
}
else if(x == '2'){
t = Math.floor(59*0.2-n);
}
else if(x == '3'){
t = Math.floor(60*0.2-n);
}
else if(x == '4'){
t = Math.floor(45*0.2-n);
}
else if(x == '5'){
t = Math.floor(45*0.2-n);
}
else if(x == '6'){
t = Math.floor(15*0.2 - n);
}
else if(x == '7'){
t = Math.floor(30*0.2-n);
}
if(t>=0)
document.getElementById("Bunks").innerHTML = "No.of Leaves Remaining: " + t;
else document.getElementById("Bunks").innerHTML = "No.of Leaves Remaining: " + t;
event.preventDefault();
}
</script>
<style language="css">
body{
font-family: "Lato", sans-serif;
background-image: url('./images/bunk.jpeg');
background-repeat: no-repeat;
background-size: cover;
position: relative;
background-attachment: fixed;
margin-top: 17%;
}
.Bunk{
margin-top: 15px;
font-weight: bold;
color: #000000;
opacity:2.7;
}
fieldset{
width:400px;
background-image: url('./images/brownbg2.jpg');
}
</style>
</head>
<body>
<div class="d" align="center">
<form>
<fieldset>
<h2 align="Center">Sem-III Leave Calculator</h2>
<div class="Bunk">
<table align="center" class="tabs">
<tr>
<td><b>Subjects:</b></td>
<td>
<select id="Sub" size="1">
<option>Subjects</option>
<option value="1">IMA 211 Mathematics</option>
<option value="2">ICS 211 Design and analysis of Algorithms </option>
<option value="3">ICS 212 Operating System</option>
<option value="4">ICS 213 DBMS</option>
<option value="5">ICS 214 ITWorkshop III</option>
<option value="6">ICS 215 Data Structures II</option>
<option value="7">ISC 211 Introduction to Bioinformatics</option>
</select>
</td>
</tr>
<tr>
<td><b>No.of Leaves taken:</b></td>
<td><input type="text" id="num1" /><br></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" onclick="fn()" ></td>
</tr>
<tr>
<td colspan="2" id="Bunks"><b>No.of Leaves Remaining:</b></td>
</tr>
</table>
</div>
</fieldset>
</form>
</div>
</body>
</html>