Ajax同时上传表单序列化参数+自定义参数

$.ajax({
                    type:'POST',
                    url :"<{:U('jiuzhu/edit')}>",
                    data:$.param({'name1':value1,'name2':value2})+'&'+$('form').serialize(),
                    success:function(msg){
                    if(msg == 1){
                           toastr.success('修改成功')
                    }else{
                         toastr.error('失败')
                    }
 
                }
            })

猜你喜欢

转载自www.cnblogs.com/LingCoder/p/9558143.html