Thuộc tính kiểu trống
Thí dụ
Thay đổi cách hiển thị các ô trống:
function show()
{
document.getElementById("myTable").style.emptyCells = "show";
}
function hide()
{
document.getElementById("myTable").style.emptyCells = "hide";
}
Định nghĩa và Cách sử dụng
Thuộc tính blankCells đặt hoặc trả về có hiển thị đường viền và nền của các ô trống hay không.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
emptyCells | Yes | Yes | Yes | Yes | Yes |
Cú pháp
Trả lại thuộc tính blankCells:
object.style.emptyCells
Đặt thuộc tính blankCells:
object.style.emptyCells = "show|hide|initial|inherit"
Giá trị tài sản
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 |
Chi tiết kỹ thuật
Giá trị mặc định: | buổi bieu diễn |
---|---|
Giá trị trả lại: | Một chuỗi, đại diện cho đường viền và nền của các ô trống |
Phiên bản CSS | CSS2 |
Các ví dụ khác
Thí dụ
Trả lại thuộc tính blankCells:
alert(document.getElementById("myTable").style.emptyCells);
Các trang liên quan
Hướng dẫn CSS: Bảng CSS
Tham chiếu CSS: thuộc tính ô trống
❮ Đối tượng phong cách