Javascript examples for CSS Style Property:borderBottom
Set the width, style and color of the bottom border of a <div> element:
<!DOCTYPE html> <html> <head> <style> #myDiv {/*from ww w . ja v a2 s .co m*/ border: thick solid blue; } </style> </head> <body> <div id="myDiv">This is a div element.</div> <br> <button type="button" onclick="myFunction()">Change bottom border</button> <script> function myFunction() { document.getElementById("myDiv").style.borderBottom = "thin dotted red"; } </script> </body> </html>