Javascript examples for CSS Style Property:borderSpacing
Set the space between cells in a table
<!DOCTYPE html> <html> <body> <table id="myTable" border="1" style="border-spacing:10px;"> <tr> <th>Month</th> <th>Dollor</th> </tr>//from w w w . j a v a2 s . c o m <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$150</td> </tr> </table> <br> <button type="button" onclick="myFunction()">Test</button> <script> function myFunction() { document.getElementById("myTable").style.borderSpacing = '5px 5px'; } </script> </body> </html>