I am working on this program that will show interest in an account for each year for 10 years. I want to click on a button and it display the interest for each year for 10 years.
The box shows up but the calcuations do as well. It all comes up at once. I dont know what I am suppose to use for onClick="show()"> that is all I have used in the past so I am lost here!
Here is what I have so far:
<title> Calcuate interest for 10 years </title>
return (parseFloat(p) * Math.pow( (1+parseFloat(r)), parseInt(n,10) )).toFixed(2);
document.write( i + ". "+ a("1000.00",".05",i) +"<br />");
<p><input type="button" value="click to calcuate interest for 10 years" onClick="function a(p,r,n)">