zoukankan      html  css  js  c++  java
  • uploadify 使用 详细 说明

    简单 常用的 时间 有点 紧  先写 这点 ,  有时间 在更新 下面有 例子  链接 不过要 自己 摘 一下 很简单的啦  

    <script type="text/javascript">
    $(function () {
    $("#file").uploadify({
    'upload_url': '/Common/UpdaloadImg',  //处理的页面
    'cancelImg': '/uploadify/cancel.png',
    'folder': 'UploadFile',
    'queueID': 'fileQueue',      //显示 上传进度的 DIV 的 ID
    'multi': false,  //是否允许 多个文件上传
    'auto': true,  //是否 自动上传
    'fileTypeExts': '*.jpg;*.jpeg;*.png;*.gif;*.bmp',    //允许类型
    'fileTypeDesc': '*.jpg;*.jpeg;*.png;*.gif;*.bmp',  //点击 选取文件夹的时候的 提示 没什么用
    'wmode': 'transparent', 
    'sizeLimit': 1024 * 500,   //文件 大小 单位 字节

    //选取文件的时候 触发事件
    'onSelect': function (fileObj) {
    if (fileObj.size >= 1024 * 500) {
    show_v_msg('超出限制大小,请重新选择!', 'error');
    $('#file').uploadifyCancel(fileObj);
    }
    },
    'onUploadProgress': function (file, fileBytesLoaded, fileTotalBytes) {
    $('#btn_sb').attr("disabled", "disabled");
    },

    // 成功的时候触发
    'onUploadSuccess': function (fileObj, response, data) {
    if (response) {

    //response 返回路径
    $('#PicPath').val(response);
    alert('上传成功!');
    }
    else {
    $("#file").uploadifyCancel(fileObj);
    show_v_msg(fileObj.name + "上传失败,请重试", 'error');
    }
    $('#btn_sb').removeAttr("disabled");
    },
    'onAllComplete': function (event, data) {
    $('#btn_sb').removeAttr("disabled");
    }
    });
    });
    </script>

    http://yunpan.cn/cgftiGrkcN7Ia  提取码 f455

  • 相关阅读:
    【嵌入式linux】(第三步):安装串口终端 (ubuntu安装minicom串口终端)
    vim常用命令总结
    usb调试
    查找当前文件夹内容
    Android SDK开发包国内下载地址
    ubuntu下svn使用指南
    Ubuntu vim显示行号语法高亮自动缩进
    android_handler(一)
    HDU 1241 Oil Deposits (DFS)
    计划
  • 原文地址:https://www.cnblogs.com/Zing/p/3992888.html
Copyright © 2011-2022 走看看