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