I'm sorry that I can't find a property title of my problem. I wrote a simple web page and some javascript to insert table row and delete it. Now my problem is when I delete the last inserted row, the second cell of the first table row's width became zero in IE6. Anyone can give me some advice? Great thanks.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('myTable').deleteRow(i);
}
function insertRowInTable(){
var table = document.getElementById("myTable");
var lastRow = table.rows.length;
var newRow = table.insertRow(lastRow);
var i=0;
for(;i<9;i++){
var td = newRow.insertCell(-1);
td.innerHTML = ""+i;
}
newRow.insertCell(-1).innerHTML = "<input type='button' value='Delete"+newRow.rowIndex+"' onclick='deleteRow(this)'>";
}
</script>
</head>
<BODY><TABLE id=myTable width=450 border=1>
<TBODY>
<TR width="450">
<TD width=225 colSpan=7>Row 3</TD>
<TD width=225 colSpan=3><INPUT onclick=insertRowInTable(); type=button value=insert></TD></TR></TBODY></TABLE></BODY>
</html>