打开swfupload.js,找到

SWFUpload.prototype.getFlashHTML = function ()

给object加上一个classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″,就可以乐。

具体代码如下,需要判断一下,不然在Chrome下又显示不出为鸟。

SWFUpload.prototype.getFlashHTML = function () {
    var classid = "";
    var Sys = {};
    var ua = navigator.userAgent.toLowerCase();
    if (window.ActiveXObject) {
    Sys.ie = ua.match(/msie ([\d.]+)/)[1];
    }

    if (Sys.ie && Sys.ie.substring(0, 1) == "9") {
        classid = \'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\';
    }

    // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
    return [\'<object \', classid, \' id="\', this.movieName, \'" type="application/x-shockwave-flash" data="\', this.settings.flash_url, \'" width="\', this.settings.button_width, \'" height="\', this.settings.button_height, \'" class="swfupload">\',
    \'<param name="wmode" value="\', this.settings.button_window_mode, \'" />\',
    \'<param name="movie" value="\', this.settings.flash_url, \'" />\',
    \'<param name="quality" value="high" />\',
    \'<param name="menu" value="false" />\',
    \'<param name="allowScriptAccess" value="always" />\',
    \'<param name="flashvars" value="\' + this.getFlashVars() + \'" />\',
    \'</object>\'].join("");
};

  

版权声明:本文为blackice原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/blackice/archive/2013/02/16/2913087.html