I have two textboxes Num1
and Num2
and another textbox Sum
having the value 10
.
How can I do this wherein if the user will enter a number for Num1
, it will add it to Sum
and dynamically change the displayed number in the Sum
textbox. If the user will enter a number in Num2
it will also add that number to the updated number shown in Sum
textbox and dynamically change the value for Sum
textbox also.
How to do this in Javascript?
There are other ways to reference the form items, but this one works.
Another version.
Something like that: