怎么才能让 图1 form-data里面的json格式变成图2红框的格式呢
1 回答
慕哥9229398
TA贡献1877条经验 获得超6个赞
var formData = new FormData();
formData.append('email',email);
formData.append('name',name);
formData.append('enquiry', enquiry);
$.ajax({
url:'',
method:'post',
dataType:'json',
cache: false,
processData: false,
contentType: false,
data: formData,
success:function(data){
//do something
}
},error:function(){
//do something
}
})
添加回答
举报
0/150
提交
取消