var submitForm = new FormData();submitForm.append("name",name);submitForm.append("pass",pass);//提交数组for (var i=0;i<likes.length;i++){ submitForm.append("likeList",likes[i]);}$.ajax({ type:"POST", url:"#", data:submitForm, processData:false, contentType:false, success:function(result){ }}) ps:用来异步提交文件上传表单,上传文件
时间: 2024-11-02 20:47:11