Internet Explorer 11:table.rows 不工作

Internet Explorer 11: table.rows not working

我有这个 jasmine 测试套件在 Google Chrome/ Firefox(并且曾经与 Internet Explorer 一起工作)上正常工作:

http://gem-calendar.com/shared_code/test/js_test/control_utilities_test.html

今天添加新测试后,我发现以下代码行(Dreamweaver 中的 571)不再适用于 Internet Explorer 11:

var table = document.getElementById('LOG_TABLE');

var length = table.rows[0].cells.length;

当我使用 console.log() 打印 table 变量时,我可以看到 IE 能够获取 table,但无法找到 [=47= 中的行].

但是,chrome一切都很好:

和火狐:

我在这里很困惑,因为 table.rows 是 javascript 中的一个非常标准的函数,而且它似乎没有在其他地方报告过类似的问题。

有没有人遇到过类似的问题?

哇,伙计们,不管你信不信,问题出在 CSS 文件上。

table.TABLE_V_SCROLL>tbody, div.TABLE_V_SCROLL>div.tbody {

    display: block;
}

table.TABLE_V_SCROLL>thead, div.TABLE_V_SCROLL>div.thead {

    display: table;
}

Internet Explorer 11 似乎不喜欢我们为表格设置显示 属性。

现在的问题是我的代码需要这些行才能在 Google Chrome -_-...