-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
28 lines (27 loc) · 1.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="scripts/main.js" defer></script>
<link rel="stylesheet" href="Styles/site.css">
</head>
<body>
<div id="changeCalculator">
<h1>Change Calculator</h1>
<label for="amount">Enter amount of change due:</label>
<p id="Tip">Tip: You can input it as $1.22 or 1.22 it has same value, you can also do .22
this will give you the result, however if you don't add the decimal, your calculation won't be correct.</p>
<input type="text" id="amount" name="amount">
<p id="amountError" class="error"></p>
<button onclick="makeChange(document.getElementById('amount').value)">Make Change</button>
<div id="result">
<p>Quarters: <span id="quarters"></span></p>
<p>Dimes: <span id="dimes"></span></p>
<p>Nickels: <span id="nickels"></span></p>
<p>Pennies: <span id="pennies"></span></p>
</div>
</div>
</body>
</html>