fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <body> <table id="myTable" border="1" style="border-spacing:10px;"> <tr> <th>月份</th> <th>储蓄</th> </tr> <tr> <td>一月</td> <td>$100</td> </tr> <tr> <td>二月</td> <td>$150</td> </tr> </table> <br> <button type="button" onclick="myFunction()">返回表格中单元格之间的距离</button> <script> function myFunction(){ alert(document.getElementById("myTable").style.borderSpacing); } </script> </body> </html>
运行结果