当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM border 属性

HTML DOM
DOM TableRow 对象
DOM Textarea 对象
DOM Window 对象

HTML DOM border 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 440 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The border property sets or returns the width (in pixels) of the table border.
border属性可设置或返回表格的边框宽度(象素)

Syntax 语法

tableObject.border=number


Example 举例

<html>
<head>
<script type="text/javascript">
function changeBorder()
{
document.getElementById('myTable').border="10"
}
</script>
</head>
<body>
<table border="1" id="myTable">
<tr>
<td>100</td>
<td>200</td>
</tr>
<tr>
<td>300</td>
<td>400</td>
</tr>
</table>
<form>
<input type="button" onclick="changeBorder()"
value="Change Border">
</form>
</body>
</html>


演练

Change the width of a table border
改变表格边框的宽度

评论 (0) All

登陆 | 还没注册?