W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function setFixedTableLayout() { document.getElementById('myTable').style.tableLayout="fixed"; } </script> </head> <body> <table id="myTable" border="1" width="100%"> <col width="20%"><col width="40%"><col width="40%"> <tr> <td>1000000000000000000000000000</td> <td>10000000</td> <td>100</td> </tr> </table> <input type="button" onclick="setFixedTableLayout()" value="Set fixed table layout"> </body> </html>