This simple javascript/html combination that should calculate exponential growth is not working for me It returns NaN when I submit
This is the code:
<html>
<head>
<script>
function Start() {
var GetA = document.getElementById("A").value;
var GetB = document.getElementById("B").value;
var GetX = document.getElementById("X").value;
var ParseA = parseInt(GetA);
var ParseB = parseInt(GetB);
var ParseX = parseInt(GetX);
var Num1 = ParseB + 100;
var Num2 = Num1 * .01;
var Num3 = Math.pow(Num2, ParseA);
var Num4 = Num3 * ParseA;
document.getElementById("Answer").innerHTML = Num4;
}
</script>
</head>
<body>
<input id="A" placeholder="Starting Number">
<br />
<input id="B" placeholder="Rate">
<br />
<input id="X" placeholder="Time">
<br />
<input type="button" id="Submit" value="Submit" onclick="Start()">
<p id="Answer"></p>
</body>
</html>