<script> <BR>var oTable=document.getElementById("test"); <BR>oTable.innerHTML="<tr><td>innerHTML"; <BR></script>
IE9:Invalid target element for this operation.
var oTable=document.getElementById("test");
//oTable.innerHTML="
innerHTML |
";
setTableInnerHTML(oTable,"
innerHTML |
");
function setTableInnerHTML(table, html) {
if(navigator && navigator.userAgent.match(/msie/i)){
var temp = table.ownerDocument.createElement('div');
temp.innerHTML = '
';
if(table.tBodies.length == 0){
var tbody=document.createElement("tbody");
table.appendChild(tbody);
}
table.replaceChild(temp.firstChild.firstChild, table.tBodies[0]);
} else {
table.innerHTML=html;
}
}