Change keypress
to keyup
:
$(someTextInputField).on("keyup", function() {
alert($(this).val());
});
keypress
is fired when the key is pressed down, keyup
is fired when the key is released.
More Related Contents:
- How to set file input value when dropping file on page? [duplicate]
- What is the difference between the mouseover and mouseenter events?
- How to stop default link click behavior with jQuery
- jQuery event that triggers after CSS is loaded?
- jQuery Change event on an element – any way to retain previous value?
- Get the clicked object that triggered jquery blur() event [duplicate]
- Drop event not firing in chrome
- How do I handle a click anywhere in the page, even when a certain element stops the propagation?
- jQuery AJAX submit form
- Check if an image is loaded (no errors) with jQuery
- jQuery Event Keypress: Which key was pressed?
- How to capture the browser window close event?
- Definitive way to trigger keypress events with jQuery
- Prevent double submission of forms in jQuery
- Can I call jQuery’s click() to follow an link if I haven’t bound an event handler to it with bind or click already?
- How to submit an HTML form without redirection
- How do you log all events fired by an element in jQuery?
- Event delegation vs direct binding when adding complex elements to a page
- Jquery: change event to input file on IE
- Preventing click event with jQuery drag and drop
- Attach an event in a child iframe to a handler in the parent window
- Javascript with jQuery: Click and double click on same element, different effect, one disables the other
- window.resize event firing in Internet Explorer
- How to detect if the user clicked the “back” button
- Performance difference between jQuery’s .live(‘click’, fn) and .click(fn)
- How to prevent form element from sending some fields we don’t want?
- jQuery: How to listen for DOM changes?
- submit event does not fire if submit initiated programmatically
- .js.erb VS .js
- jquery serialize and multi select dropdown