<html>
<body>
<div id="myDiv" style="border-left:thick solid red">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Return the width of the left border</button>
<script>
function myFunction() {
alert(document.getElementById("myDiv").style.borderLeftWidth);
}
</script>
</body>
</html>