Return the borderCollapse property:
alert(document.getElementById("myTable").style.borderCollapse);
<!DOCTYPE html> <html> <head> <style> td, th { border: 1px solid black; } </style>//from w w w. java 2s . co m </head> <body> <table id="myTable" style="border-collapse:collapse;"> <tr> <th>Item</th> <th>Savings</th> </tr> <tr> <td>CSS</td> <td>$100</td> </tr> <tr> <td>HTML</td> <td>$50</td> </tr> </table> <br> <button type="button" onclick="myFunction()">Return border collapse</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = document.getElementById("myTable").style.borderCollapse; } </script> </body> </html>