With
<input type="text" onKeyPress="alert(this.value)">
the alert box displays the value in the box, not included the current key depressed.
However, this does not exhibit the same behavior, and I don't know why.
<input type="text" onKeyPress="handleInput(this.value)">
function handleInput(value){
alert(value);
}
Added This http://jsfiddle.net/abalter/adbbb599/6/