Get the border-left property values of a <div> element: - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderLeft

Description

Get the border-left property values of a <div> element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<div id="myDiv" style="border-left:5px solid red;">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Return left border</button>

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

</body>
</html>

Related Tutorials