How can i emulate the backspace key function when i press the up arrow?
This is what i have so far and its not working :
if ( e.keycode === 38 ) {
e.preventDefault();
$(e.target).trigger({
type: "keypress",
which: 8
};
Description
You can use jQuery’s
keyupmethod to get this done.As far as i understand you want to remove the last char in the field.
Checkout my sample and this jsFiddle Demonstration
Sample
More Information