HTML DOM emptyCells Property
Complete Style Object Reference
Definition and Usage
The emptyCells property sets whether or not to show empty cells in a table.
Syntax
Object.style.emptyCells=hide|show
|
Possible Values
Value |
Description |
hide |
Default. No borders are drawn around empty cells |
show |
Borders are drawn around empty cells |
Example
The following example changes how empty cells are shown:
<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>
|
Try-It-Yourself Demos
Change
how empty cells are shown
Complete Style Object Reference
…
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|