HTML DOM cellSpacing 属性

定义和用法

cellSpacing 属性可设置或返回在表格中的单元格之间的空白量(以像素为单位)。

语法

tableObject.cellSpacing=pixels

实例

下面的例子更改了表格的 cellSpacing:

<html>
<head>
<script type="text/javascript">
function spacing()
  {
  document.getElementById('myTable').cellSpacing="15"
  }
</script>
</head>
<body>

<table id="myTable" border="1">
<tr>
<td>100</td>
<td>200</td>
</tr>
<tr>
<td>300</td>
<td>400</td>
</tr>
</table>
<br />
<input type="button" onclick="spacing()" value="Change Cellspacing">

</body>
</html>
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南