官网:http://c7.gg/fw4sn
案例:
文件上传进度
// 文件上传过程中创建进度条实时显示。
uploader.on( 'uploadProgress', function( file, percentage ) {
    var $li = $( '#'+file.id ),
        $percent = $li.find('.progress .progress-bar');
 
    // 避免重复创建
    if ( !$percent.length ) {
        $percent = $('<div class="progress progress-striped active">' +
          '<div class="progress-bar" role="progressbar" style="width: 0%">' +
          '</div>' +
        '</div>').appendTo( $li ).find('.progress-bar');
    }
 
    $li.find('p.state').text('上传中');
 
    $percent.css( 'width', percentage * 100 + '%' );
})
文件成功、失败处理
uploader.on( 'uploadSuccess', function( file ) {
    $( '#'+file.id ).find('p.state').text('已上传');
});
 
uploader.on( 'uploadError', function( file ) {
    $( '#'+file.id ).find('p.state').text('上传出错');
});
 
uploader.on( 'uploadComplete', function( file ) {
    $( '#'+file.id ).find('.progress').fadeOut();
});

最新文章

  1. Linux的tmpfs文件系统
  2. php的两个符号@和&amp;---php总会要知道的系列
  3. The error occurred while setting parameters 错误解析--Bad value for type timestamp : 3
  4. Oracle下的IF EXISTS()
  5. 【android】android中activity的生命周期
  6. android 基础学习图片六progross
  7. Cloudera Manager、CDH零基础入门、线路指导 http://www.aboutyun.com/thread-9219-1-1.html (出处: about云开发)
  8. Android网络:开发浏览器(二)——功能完善之长按网页图片菜单
  9. java学习笔记-Thread
  10. jquery validation remote depends 验证触发条件
  11. int装箱比较
  12. Plupload上传插件简单整理
  13. IDEA XML注释与取消注释快捷键
  14. Linux退出状态码
  15. ros 使用笔记
  16. spring security 4.2后出现CouldnotverifytheprovidedCSRFtokenbecauseyoursessionwasnotfound
  17. Lua面向对象 --- 封装
  18. firedac引擎DATASNAP多表查询和多表提交
  19. 鼠标不能用怎么办 USB OPTICAL MOUSE
  20. CentOS7 上systemctl

热门文章

  1. CAAnimation临时取消动画,永久取消动画
  2. 一个js程序:离下一个圣诞节还有多少天?
  3. select 中添加option的注意
  4. Validate the date format
  5. MIUI添加内存调试工具:查看进程中的Bitmap信息
  6. Spring Boot 连接池
  7. window环境mysql解压版配置
  8. 反射, getClass(), 和something.class以及类型类(转)
  9. 第八章&#160;高级搜索树 (xa3)红黑树:插入
  10. pairs