The default behavior of a backspace key is (by default) annoying on forms in both IE and minimally in Firefox and some others.
When you are in a text box or text area the back space key functions appropriately in all browsers that I have seen to this point. When you have a select pulled down or in focus, then one of the more annoying features of the backspace key shows up. When in this scenario, your user goes back to the previous page, and this I consider an annoying feature, particularly because data entry usually use the keyboard to make their selections. If you have a long form that is mostly filled out, then you will become hated by your community (especially if they are data entry specialists).
Here is one blog that goes much more in depth than I do, but does more than I need it to. My point is to just cover the backspace key on a dropdown list, namely for Firefox, IE and some others. How to disable a bunch of stuff.
If you want to disable backspace key on some form elements (namely dropdown select menus), using jQuery, this is how.
<script type="text/javascript">
var BACKSPACE_KEY = 8;
$(function(){
// Firefox backspace (select dropdown)
$("select").keypress(function(e){
if (e.which == BACKSPACE_KEY) return false;
});
// IE backspace
$(document).keydown(function(){
// Make sure it is ie
if (typeof window.event != 'undefined'){
skipBackspaceKey = false;
// Lets first to check that it is a backspace key that was pushed
if (event.keyCode == BACKSPACE_KEY)
{
// Now let's check to see if it is on a select dropdown
if (event.srcElement.type == "select-one")
{
skipBackspaceKey = true;
}
}
return (!skipBackspaceKey);
} // end if
});
});
</script>
And this works like a charm. It has been tested in IE and Firefox. Feel free to download the entire source project below. Remember if you are on IE, you will have to accept the scripting warning that comes up when you load the project locally.