-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (27 loc) · 1.08 KB
/
index.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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Business License count Calculator</title>
<script>
function calculateEstFee(){
var hour = document.getElementById('hours').value;
var count = document.getElementById('counts').value;
hour = isNaN(hour) ? 0 : hour;
count = isNaN(count) ? 0 : count;
var estFee = count > 0 ? hour / count : NaN;
document.getElementById('rate').value = isNaN(estFee) ? 0 : Math.round(estFee);
}
setInterval(function(){
calculateEstFee();
}, 100);
</script>
</head>
<body>
<p>Total hours worked in 12 months or 4 quarters:<br><input type="text" name="hours" id="hours" /></p>
<p style="display: none;"><input type="text" name="counts" id="counts" value="1664" /></p>
<p>Estimated employee fee:<br><input type="text" name="rate" id="rate" /></p>
</body>
</html>