Properti style.borderRightWidth digunakan untuk menetapkan lebar border kanan suatu elemen.
Sintaks:
obj.style.borderRightWidth = value;
Nilainya:
- Length
- Constants
thin
,medium
(default),thick
inherit
Contoh:
<HTML>
<HEAD>
<TITLE>style.borderRightWidth</TITLE>
<STYLE TYPE="text/css">
#mydiv
{
width: 500px;
height: 500px;
margin: 0 auto;
border: solid red 1px;
}
</STYLE>
<SCRIPT TYPE="text/javascript">
function changeRightWidth()
{
var list = document.forms[0].listRightWidth;
document.getElementById("mydiv").style.borderRightWidth = list.options[list.selectedIndex].text;
}
</SCRIPT>
</HEAD>
<BODY>
<DIV ID="mydiv"></DIV>
<FORM>
<SELECT NAME="listRightWidth" onChange="changeRightWidth()">
<OPTION SELECTED>medium
<OPTION>thin
<OPTION>thick
<OPTION>10px
<OPTION>20px
<OPTION>30px
<OPTION>40px
<OPTION>50px
<OPTION>60px
<OPTION>70px
<OPTION>80px
<OPTION>90px
<OPTION>100px
<OPTION>200px
<OPTION>300px
</SELECT>
</FORM>
</BODY>
</HTML>