IE9 IE10 使用ajaxFileupload文件上传不兼容问题

来源:互联网 发布:手机怎么淘宝实名认证 编辑:程序博客网 时间:2024/05/18 03:23

ajaxFileUpload链接地址https://github.com/carlcarl/AjaxFileUpload

需要将下面代码修改

源代码:

if(window.ActiveXObject) {      var io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />');       if(typeof uri== 'boolean'){           io.src = 'javascript:false';       }       else if(typeof uri== 'string'){           io.src = uri;       }   }  
修改后的代码:

if(window.ActiveXObject) {     if(jQuery.browser.version=="9.0" || jQuery.browser.version=="10.0"){          var io = document.createElement('iframe');          io.id = frameId;          io.name = frameId;      }else if(jQuery.browser.version=="6.0" || jQuery.browser.version=="7.0" || jQuery.browser.version=="8.0"){          var io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />');          if(typeof uri== 'boolean'){              io.src = 'javascript:false';          }          else if(typeof uri== 'string'){              io.src = uri;          }      }  } 


0 0
原创粉丝点击