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

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

HTML DOM border属性


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

Definition and Usage
定义与用法

The border property sets or returns the width of the border around an image.
border属性可以设置或返回图片的边框宽度。

Syntax
语法

imageObject.border=pixels


Example
举例

The following example changes the border text of an image:
下面举例可以改变图片的边框:

<<html>

<head>
<script type="text/javascript">
function changeBorder()
{
document.getElementById("compman").border="3"
}
</script>
</head>
<body>
<img id="compman" src="compman.gif" alt="Computerman" />
<br /><br />
<input type="button" onclick="changeBorder()"

value="Change border" />
</body>
</html>


Try-It-Yourself Demos
尝试与演示

Change the border around an image
改变图片周围的边框

评论 (0) All

登陆 | 还没注册?