`
征途2010
  • 浏览: 243602 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

plupload附件上传插件IE8问题

阅读更多

前段时间遇到一个plupload上传插件问题,在其他浏览器上面运行很正常,但是就是在IE8上面第一次点击上传按钮无反应,后面再连续点击才ok。

我的初始化代码如下

_this.uploader = new plupload.Uploader({
			runtimes: 'gears,html5,flash,silverlight,html4',
			browse_button: _this._uploadFileBtnId, // you can pass in id...
			container: _this._contenterId, // ... or DOM Element itself
			url: _this._options.addUrl,
			multi_selection: false,
			chunk_size: '250kb',
			max_retries:0,

 


通过分析比对,可能是渲染引擎的问题,所以打印了下runtime
uploader.bind("Init", function (up, params) {
        $("#runtime").html("Current runtime: " + params.runtime + "");
    });
通过打印,先出现flash,然后在显示html4

这下问题出来了,按照先后顺序来检验runtime,使用flash渲染失败后,再用的html4来渲染成功。

所以解决方案如下:

将初始化参数中的runtimes,属性html4和flash调换位置,问题解决。

runtimes: 'gears,html5,html4,silverlight,flash'

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics