Set the Width of an Element's Border with JavaScript



To set the width of an element’s border in JavaScript, use the borderWidth property. Set the width using this property.

You can try to run the following code to learn how to set the width of an element’s border −

Example

Live Demo


   
      
   
   
   
      
Demo Text


Updated on: 2019-07-30T22:30:21+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements