要发送其他参数,您可以将其附加到
formdata如下所示:
var formdata=new FormData();formdata.append('simpleFile', $('#file').get('files')[0]); //use get('files')[0]formdata.append('someotherparams',someothervalues);//you can append it to formdata with a proper parameter name$.ajax({ url : 'http://www.example.com', dataType : 'json', cache : false, contentType : false, processdata: false, data: formData, //formdata will contain all the other details with a name given to parameters type : 'post', success : function(response) {something}});


