I have INPUT element and I want to reset the previous value (not necessary original value). There are 2 ways:
- Save the value in another variable and pull it out again
- Press ESC key. But I don’t want users to press ESC but click a button.
So for #2, how can I create a ESC keystroke using jquery?
Here’s an SSCCE:
This basically stores the original value of every input element with a class of
rememberduring onload and instructs the button with a class ofresetto restore it whenever clicked.