W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <head> <script> function changeBorder(id) { document.getElementById(id).style.border = "5px solid"; } </script> </head> <body> <table style="border:1px solid black" id="myTable"> <tr> <td>100</td> <td>200</td> </tr> <tr> <td>300</td> <td>400</td> </tr> </table> <p> <input type="button" onclick="changeBorder('myTable')" value="更改边框"> </p> </body> </html>