首页
极刻
圈子
教程
开源
极客社区
写文章
发极刻
建圈子
发项目
登录 / 注册
返回教程:Javascript 参考手册
TRY RUN / 在线示例
Javascript 参考手册 尝试一下
Javascript 参考手册 尝试一下
源代码
运行
<!DOCTYPE html> <html> <head> <script> function rows() { document.getElementById('myTable').rules="rows"; } function cols() { document.getElementById('myTable').rules="cols"; } </script> </head> <body> <table id="myTable"> <tr> <td>cell 1</td> <td>cell 2</td> </tr> <tr> <td>cell 3</td> <td>cell 4</td> </tr> </table> <br> <button type="button" onclick="rows()">Show only row borders</button> <button type="button" onclick="cols()">Show only col borders</button> <p><b>Note:</b> The rules property is not displayed properly in Internet Explorer prior version 9.</p> </body> </html>
运行结果