yii2 ActiveForm beforeSubmit用法
$("#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