<!DOCTYPE html>
<html>
<body>
Please enter a number:<BR>
<input type="text" id="amount_input">
<button onclick="other_amount_input()">Submit</button>
<script>
var balance=502.73;
function other_amount_input() {
var input = document.getElementById("amount_input").value;
var new_total = parseInt(input) + balance;
alert("The amount deposited is: $" + input + ".00\n" + "This is the old balance: $" + balance + "\n" + "The new total is : $" + new_total);
}
</script>
</body>
</html>
I am trying to make an input box with html and javascript that takes an input (a positive number, can be a decimal but only to the hundredth place) I have the web page working to where it will take a whole number and add it to a hard coded number and display the output which is "hard_coded_number + input_number = output_number"