suppose i have many html control in the page and all the control has a sequentially tab stop set.so if i press tab then focus move properly but i want to move focus just by
$(':input').keypress(function(e){ if(e.which == 13){ ti = $(this).attr('tabindex') + 1; $('input[tabindex='+ti+']').focus(); //try to use________ e.which = 9; return e.which; }else if(e.which == 9){ e.preventDefault(); //or return false; } });
Javascript way: