Return the width of the bottom border of a <div> element:
alert(document.getElementById("myDiv").style.borderBottomWidth);
<!DOCTYPE html> <html> <body> <div id="myDiv" style="border-bottom:thick solid red">This is a div element.</div> <br> <button type="button" onclick="myFunction()">Return the width of the bottom border</button> <p id="demo"></p> <script> function myFunction() {/*from w w w . ja v a 2 s . c om*/ document.getElementById("demo").innerHTML = document.getElementById("myDiv").style.borderBottomWidth; } </script> </body> </html>