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