更改空单元格的显示方式:
function show() {
document.getElementById("myTable").style.emptyCells = "show";
}
function hide() {
document.getElementById("myTable").style.emptyCells = "hide";
}
亲自试一试 »
emptyCells 属性设置或返回是否显示空单元格的边框和背景。
Property | |||||
---|---|---|---|---|---|
emptyCells | Yes | Yes | Yes | Yes | Yes |
返回emptyCells属性:
object.style.emptyCells
设置emptyCells属性:
object.style.emptyCells = "show|hide|initial|inherit"
Value | Description |
---|---|
show | Border and background are shown in empty cells. This is default |
hide | Border and background are hidden in empty cells |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
默认值: | 展示 |
---|---|
返回值: | 一个字符串,代表空单元格的边框和背景 |
CSS版本 | CSS2 |
CSS教程:CSS表
CSS 参考:空单元格属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!