当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM border 属性
The border property sets or returns the width (in pixels) of the table border.
border属性可设置或返回表格的边框宽度(象素)
tableObject.border=number |
<html> <head> <script type="text/javascript"> function changeBorder() { document.getElementById('myTable').border="10" } </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> <form> <input type="button" onclick="changeBorder()" value="Change Border"> </form> </body> </html> |
Change the width of a table border
改变表格边框的宽度