ajax 将整个表单提交到后台处理

$(document).on('click', '.user-save-btn', function () {
$.ajax({
url: 'index',
type: 'post',
dataType: 'json',
data: $('#user-form').serialize(),//重点在这
success: function (data) {
$('#user-render-html').html(data.data.html);
}
});
return false;
});
原文地址:https://www.cnblogs.com/xieqian111/p/5416192.html