jquery ajaxupload.js 异步上传附件

导入jquery.js ajaxupload.js

 

 

/上传案例
  var aa=new AjaxUpload('#DATA_2', {
         action: base_url+'index.php/formZhunsheng/uploadimage',
         name: 'DATA_2',
         onSubmit: function(file, extension) {
            //上传中
         },
         onComplete: function(file, response) {

          $("#oldImg").attr("src",base_url+'uploads/'+response);
          window.clearInterval(interval);
            
             this.enable();
         }
  });

你可能感兴趣的:(jQuery ajax)