Yii2.0 ActiveForm怎么ajax提交表单

2026年09月10日 16:37
有1个网友回答
网友(1):

方法如下:
$.ajax({
cache: true,
type: "POST",
url:ajaxCallUrl,
data:$('#yourformid').serialize(),// 你的formid
async: false,
error: function(request) {
alert("Connection error");
},
success: function(data) {
$("#commonLayout_appcreshi").parent().html(data);
}
});
转载,仅供参考。