Javascript DOM CSS Style borderRightStyle Property get

Introduction

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

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

View in separate window

<!DOCTYPE html>
<html>
<body>

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

<p id="demo"></p>
<script>
function myFunction() {//from w  ww  . j  a v a  2  s  . c  om
  document.getElementById("demo").innerHTML = document.getElementById("myDiv").style.borderRightStyle;
}
</script>

</body>
</html>



PreviousNext

Related