HTML DOM borderRightWidth 屬性
定義和用法
borderRightWidth 屬性設置元素的右邊框的寬度。
語法:
Object.style.borderRightWidth=thin|medium|thick|length
Possible Values
值 | 描述 |
---|---|
thin | 定義細的下邊框。 |
medium | 默認。定義中等的下邊框。 |
thick | 定義粗的下邊框。 |
length | 允許您自定義下邊框的寬度。 |
實例
本例改變右邊框的寬度:
<html>
<head>
<style type="text/css">
p
{
border: thin solid #FF0000
}
</style>
<script type="text/javascript">
function changeBorderWidth()
{
document.getElementById("p1").style.borderRightWidth="thick";
}
</script>
</head>
<body>
<input type="button" onclick="changeBorderWidth()"
value="Change right border width" />
<p id="p1">This is a paragraph</p>
</body>
</html>