请教Table中单元格的隐藏问题?
<TABLE id= "Table2 " height= "100% " cellSpacing= "2 " cellPadding= "2 " width= "100% " border=1> <TR> <TD onmouseup= "SendID(id) " id= "1-1 "> </TD> <TD onmouseup= "SendID(id) " id= "1-2 "> </TD> <TD onmouseup= "SendID(id) " id= "1-3 "> </TD>
<TD onmouseup= "SendID(id) " id= "1-4 "> </TD>
</TR>
我用脚本 function hidcell(a)
{
var cellid=a;
var aa=document.getElementById(cellid);
document.getElementById(cellid).style.display= "none ";
}
隐藏了第二个单元格,也就是 id= "1-2 "的这个单元格,问题是怎么把这个空缺留下来,而不让后面的两个单元格(id= "1-3 "和id= "1-4 ")向前补?
------解决方案--------------------原来那个隐藏,补上一个空白的
------解决方案--------------------document.getElementById(cellid).style.visibility = "hidden ";