You shouldn’t use the keypress
event, but the keyup
or keydown
event because the keypress
event is intended for real (printable) characters. keydown
is handled at a lower level so it will capture all nonprinting keys like delete and enter.
More Related Contents:
- keypress, ctrl+c (or some combo like that)
- jQuery: keyPress Backspace won’t fire?
- Trigger Keypress with jQuery
- How to trigger an event in input text after I stop typing/writing?
- JQuery: detect change in input field [duplicate]
- Increase and decrease onclick like facebook like button
- Jquery Show Tabs [closed]
- Click event doesn’t work on dynamically generated elements [duplicate]
- jQuery UI DatePicker – Change Date Format
- jQuery Event Keypress: Which key was pressed?
- jQuery doesn’t work after content is loaded via AJAX
- jQuery .val() vs .attr(“value”)
- Get checkbox value in jQuery
- jQuery Deferred – waiting for multiple AJAX requests to finish [duplicate]
- jquery data selector
- Should jQuery’s $(form).submit(); not trigger onSubmit within the form tag?
- Hide/Show Column in a HTML Table
- jQuery .load() not working in Chrome
- .autocomplete is not a function Error
- Deprecation of success Parameter in jQuery.ajax?
- jQuery disable scroll when mouse over an absolute div
- How to empty input field with jQuery
- Validate fields using JQuery validation without any submit?
- Jquery toggle event is messing with checkbox value
- jquery scroll, change navigation active class as the page is scrolling, relative to sections
- How can I enable jquery validation on readonly fields?
- HTML5 validation before ajax submit
- Updating jQuery Tablesorter plugin after removing a row from DOM
- Accessing web Service from jQuery – cross domain
- jQuery html attribute not working in IE