borderColor
枠(ボーダー)の色を参照/設定します。設定できる値はCSSでの指定と全く同じです。半角空白で区切って辺ごとに指定することもできます。
構文
オブジェクト.style.borderColor
例文
<html>
<head>
<title>borderColor</title>
<script type="text/javascript"><!--
function changeCSS() {
document.getElementById("result").style.borderColor = "red blue";
}
// --></script>
</head>
<body>
<div id="result" style="border:1px solid black">Sample text</div>
<form>
<input type="button" value="Change" onClick="changeCSS()">
</form>
</body>
</html>
関連記事
- width
- height
- fontWeight
- fontVariant
- fontStyle
- fontStretch
- fontSize
- fontFamily
- font
- display
- color
- borderWidth
- borderTopWidth
- borderTopStyle
- borderTopColor
- borderTop
- borderStyle
- borderRightWidth
- borderRightStyle
- borderRightColor
- borderRight
- borderLeftWidth
- borderLeftStyle
- borderLeftColor
- borderLeft
- borderBottomWidth
- borderBottomStyle
- borderBottomColor
- borderBottom
- border
- backgroundColor
スポンサーリンク





