英 [ˈbɔ:də widθ] 美 [ˈbɔrdɚ wɪdθ]
n.边框宽度
javascript borderWidth属性 语法
作用:设置所有四个边框的宽度。
语法:Object.style.borderWidth=thin|medium|thick|length
参数:thin 定义细的下边框。 medium 默认。定义中等的下边框。 thick 定义粗的下边框。 length 允许您自定义下边框的宽度。
javascript borderWidth属性 示例
<html>
<head>
<style type="text/css">
p
{
border: thin solid #FF0000
}
</style>
<script type="text/javascript">
function changeBorderWidth()
{
document.getElementById("p1").style.borderWidth="thick thin";
}
</script>
</head>
<body>
<input type="button" onclick="changeBorderWidth()"
value="Change border widths" />
<p id="p1">This is a paragraph</p>
</body>
</html>运行实例 »
点击 "运行实例" 按钮查看在线实例