Is there a way to update the value of a textbox on every key press?
I'm doing currency conversion. So, there are two textboxes, one for the user to input the value while the other will automatically show the converted amount on every key press.
Should I use a for loop? But what should I loop?
The textboxes in the following for loop should be able to do its individual row conversion
<% for(int i=0; i<2; i++) { %>
<td><input type="text" id= "amount" name="amount<%=i%>" /></td>
<td><input type="text" id= "convertedAmount" name="convertedAmount<%=i%>" readonly/></td>
<%}%>
How should I get started in attempting this task?
Thanks in advance for any possible help.
keypresseventmyInput.addEventListener('keypress', handler)