Specify rules for a table
<html> <head> <script type="text/javascript"> function rowRules(){ document.getElementById('myTable').rules="rows" } function colRules(){ document.getElementById('myTable').rules="cols" } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>d</td> <td>d</td> </tr> <tr> <td>d</td> <td>d</td> </tr> <tr> <td>Row3 cell1</td> <td>Row3 cell2</td> </tr> <tr> <td>Row4 cell1</td> <td>Row4 cell2</td> </tr> <tr> <td>Row5 cell1</td> <td>Row5 cell2</td> </tr> </table> <form> <input type="button" onclick="rowRules()" value="Show row borders"> <input type="button" onclick="colRules()" value="Show col borders"> </form> </body> </html>