 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
With JavaScript how to change the width of a table border?
To change the width of a table border, use the DOM border property. You can try to run the following code to change the width of a table border in JavaScript −
Example
<!DOCTYPE html> <html>    <head>       <script>          function borderFunc(x) {             document.getElementById(x).style.border = "5px dashed blue";          }       </script>    </head>      <body>       <table style = "border:2px solid black" id = "newtable">          <tr>             <td>One</td>             <td>Two</td>          </tr>          <tr>             <td>Three</td>             <td>Four</td>          </tr>          <tr>             <td>Five</td>             <td>Six</td>          </tr>       </table>       <p>          <input type = "button" onclick = "borderFunc('newtable')"          value = "Change Border Width">       </p>    </body> </html>Advertisements
 