按回车提交

//Press <Enter> or <Space> key to submit login form when Submit button is focus
    $("#submitBtn").bind("keypress", function(e) {
        if( e.which==13|| e.which==32)
        {
        $(this).click();
        }
    });

你可能感兴趣的:(回车提交)