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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM