编辑下面的代码:【加编码】
<html> <head> <script> function insCell() { var x=document.getElementById('tr1').insertCell(0); x.innerHTML="The famous"; } </script> </head> <body> <table border="1"> <tr id="tr1"> <td>Peter</td> <td>Griffin</td> </tr> </table> <br> <input type="button" onclick="insCell()" value="Insert cell"> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂