码迷,mamicode.com
首页 > Web开发 > 详细

input上传文件处理

时间:2018-01-16 17:58:14      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:class   cti   上传   ted   upload   函数   inpu   body   fun   

<input type="file" class="upload"  onchange="change()"/>如果想要连续上传同一张图片,由于文件相同,导致onchang函数不会触发,解决的方法是在change()处理完业务后将其值置为空:$(".upload").val("");

即:function change(){

  //handle selected file

  $(".upload").val("");

}

 

input上传文件处理

标签:class   cti   上传   ted   upload   函数   inpu   body   fun   

原文地址:https://www.cnblogs.com/linduan/p/8296310.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!