is there a cross-browser solution to disable \'tab\' on a input type=\'text\' ?
Pressing \'tab\' moves you to the
Yes,check if the key pressed was tab, and if so, returns false:
jQuery('.noTab').find('input,select,textarea').keydown(function (e) {
if (e.which === 9) {
return false;
}
});
jQuery will allow this work on legacy browsers.
http://jsfiddle.net/JxMhY/
On that fiddle it shows 2 forms, one with the class "noTab" and one without, as tab/shift+tab are useful for many forms, but not the one which has a special "tab" action.