Javascript examples for CSS Style Property:borderTopWidth
Change the width of the top border of a <div> element to thin:
<!DOCTYPE html> <html> <head> <style> #myDiv {/* w ww .j ava 2 s.co m*/ border-style: solid; } </style> </head> <body> <div id="myDiv">This is a div element.</div> <br> <button type="button" onclick="myFunction()">Change width of the top border</button> <script> function myFunction() { document.getElementById("myDiv").style.borderTopWidth = "thin"; } </script> </body> </html>