【问题标题】:Uploadify browser compatibility issueUploadify浏览器兼容性问题
【发布时间】:2012-06-07 13:16:25
【问题描述】:

我正在使用 uploadify 插件来允许用户将文件上传到我的网站。该脚本在 chrome 中运行良好,但在 ie 和 firefox 中无法运行

  $(function() {
    $('#file_upload').uploadify({
     'checkExisting' : 'check-exists.php',
    'buttonText' : 'Select project',
    'fileSizeLimit' : '163840KB',
     'fileTypeDesc' : 'Image Files',
    'fileTypeExts' : '*.zip; *.rar',
        'swf'      : 'uploadify.swf',
        'uploader' : 'uploadify.php',
        'onUploadError' : function(file, errorCode, errorMsg, errorString) {
         $("input[type=submit]").attr("disabled", "disabled");
alert('The file ' + file.name + ' could not be uploaded: ' + errorString);
        },
        'onUploadSuccess' : function(file, data, response) {
            $("input[type=submit]").removeAttr("disabled");
    },

    });

任何建议:)

【问题讨论】:

    标签: jquery file-upload upload uploadify


    【解决方案1】:

    您发布的代码有一个尾随逗号(最后一个),在某些版本的 IE (see this question) 中可能无法使用。

    此外,您的括号并非全部闭合。尝试将}); 更改为}) });

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-17
      • 2014-09-12
      • 1970-01-01
      • 2021-08-04
      • 1970-01-01
      • 2015-10-29
      • 2012-11-15
      相关资源
      最近更新 更多