代码示例:(标识:jsck_style_borderbottomstyle_2)
<!DOCTYPE html>
<html>
<head>
<style>
#myDiv {
  border: thick solid #FF0000;
}
</style>
</head>

<body>

<div id="myDiv">这是 div。</div>
<br>
<button type="button" onclick="myFunction()">更改下边框的样式</button>

<script>
function myFunction() {
  document.getElementById("myDiv").style.borderBottomStyle = "dotted";
}
</script>

</body>
</html>
运行结果: