Style emptyCells 属性
实例
例子 1
更改空单元格的显示方式:
function show() {
document.getElementById("myTable").style.emptyCells = "show";
}
function hide() {
document.getElementById("myTable").style.emptyCells = "hide";
}
例子 2
返回 emptyCells 属性:
alert(document.getElementById("myTable").style.emptyCells);
语法
返回 emptyCells 属性:
object.style.emptyCells
设置 emptyCells 属性:
object.style.emptyCells = "show|hide|initial|inherit"
属性值
| 值 | 描述 |
|---|---|
| show | 在空单元格中显示边框和背景。默认。 |
| hide | 在空单元格中隐藏边框和背景。 |
| initial | 将此属性设置为其默认值。请参阅 initial。 |
| inherit | 从其父元素继承此属性。请参阅 inherit。 |
技术细节
| 默认值: | show |
|---|---|
| 返回值: | 字符串,表示空单元格的边框和背景。 |
| CSS 版本: | CSS2 |
浏览器支持
| Chrome | Edge | Firefox | Safari | Opera |
|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Opera |
| 支持 | 支持 | 支持 | 支持 | 支持 |