, . ( ) , ; , .
, , Escape - quirk IE: Escape , IE . , Escape , Escape . , <input type="reset"> , Escape reset. , , reset.
, reset , form.reset(). reset , input.value= input.defaultValue ( input.checked= input.defaultChecked / defaultSelected ).
If, however, you need a value that was present at the time of the last focused field, since IE behaves when there is no reset button, you will need to do some memorization of variables, for example:
var undonevalue= $('#undoable').val();
$('#undoable').focus(function() {
undonevalue= $('#undoable').val();
});
$('#undoer').click(function() {
$('#undoable').val(undonevalue);
});
source
share