表头内部HTML不能在IE中工作但jquery html of the

时间:2013-07-01 12:16:04

标签: javascript jquery

我有一个像这样的jQuery代码,

var thead = $("<thead></thead>");
thead.html("<tr><td> header cell value</td></tr>");

此代码在Mozilla中有效,但在Internet Explorer中检查时,我发现IE对innerHTML thead tbody的{​​{1}}有限制。

我在网上搜索,发现innerHTML实际上不是W3c标准。

Mozilla允许,但IE限制 我知道可以通过Javascript中的insertRow()insertCell DOM来完成,但为了简化工作,我想知道是否还有其他方法可以在IE中实现这样的工作。

  • thead.innerHTML永远不会在IE中工作吗?
  • 如果是这种情况那么thead.html() - jQuery单独工作怎么样?

任何输入?

0 个答案:

没有答案