plupload

$("#uploader").plupload({
    // General settings
    runtimes: 'html5,flash,silverlight,html4',


    url: "${path}/management/report/callNameBlock/upload",

    // Maximum file size
    max_file_size: '1000mb',

    // Specify what files to browse for
    filters: [
        { title: "Excel files", extensions: "xls,xlsx" }
    ],

    // Sort files
    sortable: true,
    //只能选择一个文件
    multi_selection:false,

    // Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
    dragdrop: true,

    // Views to activate
    views: {
        list: true,
        thumbs: true, // Show thumbs
        active: 'thumbs'
    },

    // Flash settings
    flash_swf_url : 'http://rawgithub.com/moxiecode/moxie/master/bin/flash/Moxie.cdn.swf',

    // Silverlight settings
    silverlight_xap_url : 'http://rawgithub.com/moxiecode/moxie/master/bin/silverlight/Moxie.cdn.xap',
    //文件被选择后触发该事件,设置只能选择单个文件
    selected:function(event,args){
        $("#uploader_browse").addClass("ui-button-disabled ui-state-disabled");
        $("#uploader_browse").css("z-index","0");
    },
    //文件被移除后触发该事件,设置只能选择单个文件
    removed:function(event,args){
        $("#uploader_browse").removeClass("ui-button-disabled ui-state-disabled");
        $("#uploader_browse").css("z-index","1");
    }

});

页面:

<div id="uploader" class="span4">Your browser doesn't have Flash, Silverlight or HTML5 support.</div>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值