Javascript examples for CSS Style Property:borderTopColor
Get the top border color of a <div> element:
<!DOCTYPE html> <html> <body> <div id="myDiv" style="border-top:thick solid green">This is a div.</div> <br> <button type="button" onclick="myFunction()">Return top border color</button> <script> function myFunction() {// w w w . jav a 2 s . c o m console.log(document.getElementById("myDiv").style.borderTopColor); } </script> </body> </html>