Edit This Code:
See Result »
<!DOCTYPE html> <html> <head> <style> #myDIV { border: 1px solid black; width: 300px; height: 300px; } </style> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "//hm.baidu.com/hm.js?73c27e26f610eb3c9f3feb0c75b03925"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </head> <body> <p>Click the "Try it" button to change the border property of the DIV element:</p> <button onclick="myFunction()">Try it</button> <div id="myDIV"> <h1>Hello</h1> </div> <script> function myFunction() { document.getElementById("myDIV").style.border = "15px dotted lightblue"; } </script> </body> </html>
Result: