为什么不能插入表格?
我要在第二列插入表格,可是没有任何反映,也没有提示出错?
<html>
<head>
</head>
<body>
<script language= "JavaScript ">
function a(){
MainTable.cells[1].appendChild(SubTable1);
}
</script>
<table id= "MainTable " border=2px width=100%>
<tr>
<td>
<table id= "SubTable1 " border=1px width=100%>
<tr> <td> ST1td1 </td> </tr>
<tr> <td> ST1td2 </td> </tr>
</table>
</td>
<td>
<table id= "SubTable2 " border=1px width=100%>
<tr> <td> ST2td1 </td> </tr>
<tr> <td> ST2td2 </td> </tr>
</table>
</td>
<td>
<table id= "SubTable3 " border=1px width=100%>
<tr> <td> ST3td1 </td> </tr>
<tr> <td> ST3td2 </td> </tr>
</table>
</td>
<tr>
</table>
<input type= "button " value= "在第二列插入表格 " onClick= "a ">
</body>
</html>
------解决方案--------------------onClick= "a() "
------解决方案-------------------- <input type= "button " value= "在第二列插入表格 " onClick= "a() ">
少括号