【发布时间】:2014-12-05 01:11:51
【问题描述】:
我正在处理 Internet Explorer 8,我有以下代码:
this.scrolling = false;
this.wrapper = $(wrapper);
//this.scroller = this.wrapper.down('div.elscroller');
if (this.wrapper.querySelectorAll('div.elscroller') != null ) {
this.scroller = this.wrapper.querySelectorAll('div.elscroller');
}
this.sections = this.wrapper.getElementsBySelector('div.seccion');
这在 Chrome 和 Firefox 中运行良好,但 IE 抛出:Object doesn't support this property or method in this line: this.sections = this.wrapper.getElementsBySelector('div.seccion');
HTML 代码是这样的:
<div class="elscroller">
<div class="seccion" id="seccion1"></div>
<div class="seccion" id="seccion..n"></div>
</div>
正如你所看到的,有一行注释,因为它有同样的问题,所以我进入了一种原始的做事方式,并在那里放了一个 if。只有上帝知道怎么做,但它确实奏效了。
我真的厌倦了编码,尤其是 IE8。我希望有一天人们停止使用这个#%!浏览器。
【问题讨论】:
-
什么返回
$.toSring();? -
@plalx 它返回:错误:对象不支持此属性或方法并停止解析
标签: javascript html internet-explorer internet-explorer-8 prototypejs