W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function changeBorderSpacing() { document.getElementById('myTable').style.borderSpacing="10px"; } </script> </head> <body> <table border="1" id="myTable"> <tr> <td>100</td> <td>200</td> </tr> <tr> <td>300</td> <td>400</td> </tr> </table> <br /> <input type="button" onclick="changeBorderSpacing()" value="Change border spacing"> </body> </html>