- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to set the style of the bottom border with JavaScript?
To set the style of the bottom border, use the JavaScript borderBottomStyle property. It allows you to add a bottom border.
Example
You can try to run the following code to set the style of the bottom border −
<!DOCTYPE html> <html> <body> <div id="box">Demo Text</div> <br> <button onclick="display()">Click to set style of bottom border</button> <script> function display() { document.getElementById("box").style.borderBottomStyle = "dashed"; } </script> </body> </html>
Advertisements