A bit weird... ...if running in IE8 quirks mode or in compatibility view mode, the table added by the following code doesn't render. Can anyone tell me why, because it is not obvious to me..?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
function AddTable()
{
var table = document.createElement('table');
var row = document.createElement('tr');
table.appendChild(row);
var cell = document.createElement('td');
cell.innerHTML='abc';
row.appendChild(cell);
var divContainer = document.getElementById('divContainer');
divContainer.appendChild(table);
}
</script>
</head>
<body>
<div id='divContainer'>
</div>
<input type='button' value='add table' onclick='javascript:AddTable()' />
</body>
</html>