Uploadify 上传插件引起Chrome崩溃解决方法

将Uploadify初始化代码延时加载,可解决Chrome崩溃。

setTimeout(initUploadify, 60);

 function initUploadify() {
        var $Uploadify = $("#uploadify");
        var ext;
        var id = 0;
        var params;
        $Uploadify.uploadify({
            'swf': '/Scripts/uploadify/3.1/uploadify.swf',
            'uploader': app.url,
            'method': 'post',
            'fileObjName': 'filedata',
            'queueID': 'fileQueue',
            'formData': { 'Code': 'ProductExcel', 'ASPSESSID': '' },
            'auto': false,
            'removeTimeout': 2, //文件队列上传完成1秒后删除
            'multi': true,
            'buttonClass': 'btn ',
            'buttonCursor': 'hand',
            'buttonText': "<i class='icon-upload'></i>选择附件",
            queueSizeLimit: 10,
            'fileSizeLimit': '300MB',
            'fileTypeDesc': '常见格式',
            'fileTypeExts': app.fileTypeExts,
            width: 80,
            height: 20,
            'onUploadStart': function (file) {
                $('#submit-btn').button('loading');
                $Uploadify.uploadify("settings", 'formData', getParams());
            },
            'onUploadSuccess': function (file, data, response) {
              
            },
            'onSelect': function (file) {
              
            },
            'onCancel': function (file) {
              

            }
        });
    }

  

转载于:https://www.cnblogs.com/rdst/p/4698526.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值