I have an text box and applied Allow Alphabets With Space only using jquery. Its working in chrome But in firefox the backspace key is not working.
This should work in all [major] browsers:
$('#id1').keydown(function (event) { if (event.which == 8) { // ... } else { event.preventDefault(); } );
Note the use of keydown instead of keypress, which is essential for it to work.
keydown
keypress