Javascript DOM CSS Style borderBottomStyle Property get

Introduction

Return the bottom border style of a <div> element:

alert(document.getElementById("myDiv").style.borderBottomStyle);

View in separate window

<!DOCTYPE html>
<html>
<body>

<div id="myDiv" style="border-bottom:double;">This is a div.</div>
<br>
<button type="button" onclick="myFunction()">Return bottom border style</button>

<p id="demo"></p>
<script>
function myFunction() {/*w ww  .j a  v a  2  s  . co m*/
  document.getElementById("demo").innerHTML = document.getElementById("myDiv").style.borderBottomStyle;
}
</script>

</body>
</html>



PreviousNext

Related