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