简单教程
提交运行
代码编辑器:
<script> function displayResult(){ document.getElementById("myCap").style.captionSide="bottom"; } </script> <table border="1"> <caption id="myCap">My savings</caption> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$150</td> </tr> </table> <br> <button type="button" onclick="displayResult()">移动表格标题</button>
运行结果: