-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsshier.html
More file actions
65 lines (46 loc) · 1.26 KB
/
Copy pathcsshier.html
File metadata and controls
65 lines (46 loc) · 1.26 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
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Billing Counter</title>
<link rel="stylesheet" href="cash.css">
</head>
<body>
<div id="register">
<div id="ticket">
<h1><i>Cure All Billing</i></h1>
<table>
<tbody id="entries">
</tbody>
<tfoot>
<tr>
<th>Total</th>
<th id="total">RS.0.00</th>
</tr>
</tfoot>
</table>
</div>
<form id="entry">
<input id="newEntry" autofocus placeholder="Enter the Amount">
</form>
</div>
<script > var total = 0;
document.getElementById('entry').onsubmit = enter;
function enter() {
var entry = document.getElementById('newEntry').value;
var entry = parseFloat(entry);
currency = currencyFormat(entry);
document.getElementById('entries').innerHTML += '<tr><td></td><td>' + currency + '</td></tr>';
total += entry;
document.getElementById('total').innerHTML = currencyFormat(total);
document.getElementById('newEntry').value = '';
return false;
}
function currencyFormat(number) {
var currency = parseFloat(number);
currency = currency.toFixed(2);
currency = 'Rs.' + currency;
return currency;
}</script>
</body>
</html>