$("#login-form").on("beforeSubmit", function (event) {
// Now you can work with messages by accessing messages variable
var attributes = $(this).data().attributes; // to get the list of attributes that has been passed in attributes property
var settings = $(this).data().settings; // to get the settings
});
beforeValidate,afterValidate,beforeSubmit,ajaxBeforeSend,ajaxComplete
以上有5個都可以用同樣的寫法來捕獲事件,具體參數參考activeform.js