Javascript examples for CSS Style Property:outlineWidth
Return the width of the outline of a <div> element:
<!DOCTYPE html> <html> <head> <style> #myDiv {//from ww w .j a va2s .c om border: 1px solid red; outline: dotted green; } </style> </head> <body> <div id="myDiv" style="outline-width:10px;">This is a div element.</div> <br> <button type="button" onclick="myFunction()">Return outline width</button> <script> function myFunction() { console.log(document.getElementById("myDiv").style.outlineWidth); } </script> </body> </html>