Return the right border style of a <div> element: - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderRightStyle

Description

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

Demo Code

ResultView the demo 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>

<script>
function myFunction() {//www .j  a  va 2  s  .co m
    console.log(document.getElementById("myDiv").style.borderRightStyle);
}
</script>

</body>
</html>

Related Tutorials