且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JQuery验证和放大器; ajax.beginform

更新时间:2023-01-23 19:30:28

这似乎并没有太哈克给我,但他们我不是最优雅的家伙在世界上。我想我会做不同的唯一的事情是设置它是这样的:

It doesn't seem too hacky to me, but them I'm not the most elegant guy in the world. The only thing I think I'd do differently is set it up like this:

$('#login').validate(); // setup form to use validation plugin 

var options = {
    beforeSubmit: function() {
        return $('#login').valid(); // check form is valid
    },
    success: manageResponse
};