回车enter顶替tab切换元素

回车enter代替tab切换元素$(function() {$(input).keypress(function(e) {if (e.which 13) {var tbi

回车enter代替tab切换元素

$(function() {$("input").keypress(function(e) {if (e.which == 13) {var tbi =$(this).attr('tabIndex')$('input').each(function(){var dif = Number($(this).attr('tabIndex'))-Number(tbi);if(dif==1){this.focus();this.select();return false;}})}});});
?需要对页面元素指定tabIndex属性,且按顺序递加1