emptyCells 属性设置是否显示表格中的空单元格(仅用于“分离边框”模式)。
</>code
- Object.style.emptyCells=hide|show
值 | 描述 |
---|---|
hide | 默认。不在空单元格周围绘制边框。 |
show | 在空单元格周围绘制边框。 |
本例改变空单元格的显示方式:
</>code
- <html>
- <head>
- <script type="text/javascript">
- function showEmptyCells()
- {
document.getElementById('myTable').style.emptyCells="show"
- }
- </script>
- </head>
- <body>
- <table border="1" id="myTable">
- <tr>
- <td>100</td>
- <td>200</td>
- </tr>
- <tr>
- <td>300</td>
- <td></td>
- </tr>
- </table>
- <input type="button" onclick="showEmptyCells()"
- value="Show empty cells">
- </body>
- </html>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号