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