请输入您要查询的百科知识:

 

词条 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>

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/4 5:15:37