W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <style type="text/css"> caption { caption-side:bottom; } </style> <script type="text/javascript"> function moveCaption() { document.getElementById('myTable').style.captionSide="right"; } </script> </head> <body> <table border="1" id="myTable"> <caption>This is a caption</caption> <tr> <td>100</td> <td>200</td> </tr> <tr> <td>300</td> <td>400</td> </tr> </table> <br /> <input type="button" onclick="moveCaption()" value="Move table caption"> </body> </html>