ajax异步上传文件

来源:互联网 发布:淘宝电子商品怎么发货 编辑:程序博客网 时间:2024/05/06 12:54

主要是利用一个formData对象,可以查百度。

然后原生js还是那样写,post提交,send(formData),这里贴一段由jquery写的代码


<input type="file" id="f" name="f" multiple="multiple"><button id="go">ajax上传</button>

contentType,processData 全部设置为false;

0 0
原创粉丝点击