Cylix said:
After search in the web,
I found that, insertRow, insertCell, is a bug of Mac IE,
Moreover, <table>, <tbody> seems doesn't support innerHTML,
What is the solution to show dynamic table in Mac IE?
You can use DOM core methods - use createElement and append it to a
tbody element. The first button below uses getElementById to get a
reference to a tbody element, the second uses a reference to a tr then
uses parentNode to get the tbody.
You don't have to include the tags for a tbody, one will be added anyway
(it's a mandatory element for a table but the tags are optional).
<table border="1">
<tbody id="tbodyA">
<tr id="rowA"><td>fred</td></tr>
</tbody>
</table>
<input type="button" value="Add row 1" onclick="
var b = document.getElementById('tbodyA');
var r = document.createElement('tr');
var c = document.createElement('td');
c.appendChild(document.createTextNode('new Row'));
r.appendChild(c);
b.appendChild(r);
">
<input type="button" value="Add row 2" onclick="
var b = document.getElementById('rowA');
var r = document.createElement('tr');
var c = document.createElement('td');
c.appendChild(document.createTextNode('new Row'));
r.appendChild(c);
b.parentNode.appendChild(r);
">