LZ不要费力了
IE中不能用DOM3的方法创建TABLE只能用DOM1的方法
在FF中可能可以

解决方案 »

  1.   

    可以这样
    document.getElementById("mytable").parentElement.innerHTML = "<table><tr>" + getCol() + "</tr></table>";To change the contents of the table, tFoot, tHead, and tr elements, use the table object model described in How to Build Tables Dynamically. For example, use the rowIndex property or the rows collection to retrieve a reference to a specific table row. You can add or delete rows using the insertRow and deleteRow methods. To retrieve a reference to a specific cell, use the cellIndex property or the cells collection. You can add or delete rows using the insertCell and deleteCell methods. To change the content of a particular cell, use the innerHTML property.