Return the bottom border color of a <div> element:
<!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> <p id="demo"></p> <script> function myFunction() {//from w w w . j av a 2 s .co m document.getElementById("demo").innerHTML = document.getElementById("myDiv").style.borderBottomColor; } </script> </body> </html>