Javascript examples for CSS Style Property:outline
Change the width, style and color of the outline of a <div> element:
<!DOCTYPE html> <html> <head> <style> #myDiv {// w ww. ja va 2 s. c o m border: 3px solid red; outline: 3px solid blue; } </style> </head> <body> <div id="myDiv">This is a div.</div> <br> <button type="button" onclick="myFunction()">Change outline</button> <script> function myFunction() { document.getElementById("myDiv").style.outline = "5px dotted green"; } </script> </body> </html>