JavaScript keypress event get end value of textarea
I was wondering if it were possible to get the end result in the keypress event? Currently, I am using the keyup because it is activated after the user has done text editing in a texteara, but I have written a method that does something similar using the Mootools library: input.addEvent("keypress", function (input) { var previous_result = this.value; var end_result = this.value + input.key; }); However, this method is horrible when dealing with special keys such as backspace, or if the user chooses to use CTRL + a && Backspace in which case the value of the input element would not be "an empty