As a beginner in Javascript, I am seeking assistance in creating a simple calculator that can add numbers as buttons are clicked and display the running total.
For example: If I click the button "20," it should display the number 20. Then, if I click the button "5," it should display the total of 25, and so on.
Here is the basic code I have managed to put together so far:
<form name="Calc">
<input type="text" name="Numbers" size="16"><BR>
<input type="button" value=" 5 " onClick="document.Calc.Numbers.value += '5'">
<input type="button" value=" 10 " onClick="document.Calc.Numbers.value += '10'">
<input type="button" value=" 20 " onClick="document.Calc.Numbers.value += '20'">
<input type="button" value=" 30 " onClick="document.Calc.Numbers.value += '30'">
<input type="button" value=" 50 " onClick="document.Calc.Numbers.value += '50'">
</form>