How would I use javascript to create an input field where each time the user clicks on a button in the image below, the value replaces the last zero.
Screenshot - https://i.stack.imgur.com/rikcT.png
Example:
User Clicks 1 - Value of textbox: 0.01
User Then Clicks 5 - Value of textbox: 0.15
User Then Cliks 7 - Value of textbox: 1.57
etc.
Currently, if the textbox has 0.00 and the user clicks 1, the new input is 0.001.
I am not sure what this is called to research a reliable way to accomplish it.
Edit: The current code is as follows:
<form name="Tender"
<input name="Amount" type="text"/>
</form>
<a href="#" OnClick="Tender.Amount.value += '1'" class="btn btn-primary btn-large">1</a>
<a href="#" OnClick="Tender.Amount.value += '2'" class="btn btn-primary btn-large">2</a>
<a href="#" OnClick="Tender.Amount.value += '3'" class="btn btn-primary btn-large">3</a>