, . , , submit, reset .
$.fn.focusNext = function(e) {
var t = $(this);
if ( t.is(":submit")==true || t.is(":reset")==true || t.is("textarea")==true || t.is("button")==true ) { exit(); }
if (e.which==13 || e.which==3) {
return this.each(function() {
e.preventDefault();
var fields = $(this).parents("form:eq(0)").find(":input:visible");
var index = fields.index( this );
if ( index > -1 && ( index + 1 ) < fields.length ) { fields.eq( index + 1 ).focus(); }
});
}
return true;
};
,
$(":input").keypress(function(e) { $(this).focusNext(e); });
$(":input").live("keypress", function(e) { $(this).focusNext(e); });