-
Notifications
You must be signed in to change notification settings - Fork 0
/
percent.html
88 lines (77 loc) · 2.51 KB
/
percent.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"></script>
<!-- Popper JS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<title>Aswin's Percentage Calculator</title>
<style>
#head{
background-color: #90ee90;
}
h6{
font-size: 30px;
}
input{
background-color: #2CEEF0;
font-size: 25px;
}
table{
border: 7px solid black;
background-color: yellow;
}
TD{
border: 4PX SOLID black;
}
h2{
font-size: 50px;
}
button{
font-size: 25px;
background-color: green;
color: white;
}
div{
font-size: 25px;
}
body{
background-image: url('https://media.istockphoto.com/photos/an-abstract-blue-pattern-with-numbers-picture-id178895760?b=1&k=20&m=178895760&s=170667a&w=0&h=lfh8zl1AloSdEH63b-HQIN4t2zDTtN4oCpANGgwgIpA=');
justify-content: center;
}
</style>
</head>
<body>
<script>
function go(){
var value1= document.getElementById('num').value;
var value2=document.getElementById('denom').value;
var result= value1 / value2 * 100+"%";
document.getElementById('result').innerHTML= result;
}
</script>
<div id="head" colspan="5"><h6>Aswin®</h6><p style="text-align:right;">Percentage Calculator</p></div>
<center>
<table>
<tr><td><h2>
Aswin's Percentage calculator
</h2></td></tr>
<tr>
<td><center><input type="number" placeholder="numerator" id="num"></center></td>
</tr>
<tr><td><center><input type="number" id="denom" placeholder="denominator"></td></center></tr>
<tr style="justify-content:center;"><td><center><button type="btn" onclick="go()">Go!</button></center></td></tr>
</table>
<br>
<div id="result" class="jumbotron">
%
</div>
</center>
</body>
</html>