JavaScript Reference/Javascript Properties/cellPadding

Материал из Web эксперт
Перейти к: навигация, поиск

"cellPadding" Example

   <source lang="javascript">
   

<html> <body> Click in any cell to view the cellIndex value.

Header 1 Header 2 Header 3
Cell 1 Cell 2 Cell 3


<button onclick="alert(myTable.cellPadding);">Cell Padding</button> </body> </html>


     </source>
   
  


"cellPadding" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+

| Applied_To | | +----------------+--------------------------------------------------------------+ </source>

"cellPadding" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets the padding between the cell border and its content. Value: An integer the amount of padding in pixels integer% the percent of space between the cell wall and its content.

Syntax:

document.getElementById("tableID").cellPadding = value document.all.tableID.cellPadding = value // IE only


</source>