Get the bottom border color of a <div> element: - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderBottomColor

Description

Get the bottom border color of a <div> element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
function myFunction() {//from w w  w  .j  a  v a  2  s  . c  o  m
    console.log(document.getElementById("myDiv").style.borderBottomColor);
}
</script>

</body>
</html>

Related Tutorials