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

posted @ 2018-08-08 22:49  坚持!!  阅读(1340)  评论(0编辑  收藏  举报