Javascript examples for CSS Style Property:borderStyle
Change the style of the four borders of a <div> element:
<!DOCTYPE html> <html> <head> <style> #myDiv {//from ww w.ja va 2 s. co m border: thick solid #FF0000; } </style> </head> <body> <div id="myDiv">This is a div.</div> <br> <button type="button" onclick="myFunction()">Change style of the four borders</button> <script> function myFunction() { document.getElementById("myDiv").style.borderStyle = "dotted solid double dashed"; } </script> </body> </html>