ajax实现form表单提交方式

$.ajax({
//几个参数需要注意一下
    type: "POST",//方法类型
    dataType: "json",//预期服务器返回的数据类型
    url: "./PersonalEditHandle" ,//url
    data: $('#form2').serialize(),
    success: function (result) {
        if (result.code == 1) {
            //预期服务器响应{code: 1, message: "修改成功!"}
            alert(result.message);
        }
    },
    error : function() {
        alert("异常!");
    }
});
转载请保留http://www.luofenming.com/show.aspx?id=ART2020032100002