borderStyle

書式

オブジェクト.style.borderStyle

説明

枠(ボーダー)の形状を参照/設定します。設定できる値はCSSでの指定と全く同じです。半角空白で区切って辺ごとに指定することもできます。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<script type="text/javascript"><!--
function changeCSS() {
document.getElementById("result").style.borderStyle = "dashed dotted double inset";
}
// --></script>
</head>
<body>
<div id="result" style="border:10px solid gray">Sample text</div>
<form>
<input type="button" value="Change" onClick="changeCSS()">
</form>
</body>
</html>