I want a function to be run when a keypress occurs on a text box, so I have this code:
$(\"input[x]\").keypress(function() { DoX(); })
Use onkeyup, it will show the right value.
onkeyup