Javascript examples for CSS Style Property:emptyCells
The emptyCells property sets or gets whether to show the border and background of empty cells, or not.
Value | Description |
---|---|
show | show empty cells. Default |
hide | hide empty cells |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | show |
Return Value: | A String, representing the border and background of empty cells |
CSS Version | CSS2 |
Get empty cells display settings
<!DOCTYPE html> <html> <head> <style> table, td { border: 1px solid black; border-collapse: separate; } </style>//from w w w .j a v a2 s . c om </head> <body> <table id="myTable" style="empty-cells:hide;"> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td></td> </tr> </table> <br> <button type="button" onclick="myFunction()">Return the emptyCells property</button> <script> function myFunction() { console.log(document.getElementById("myTable").style.emptyCells); } </script> </body> </html>