编辑您的代码:提交代码

x
 
1
 
2
 
3
<html>
4
<head>
5
<style type="text/css">
6
caption
7
{
8
caption-side:bottom; 
9
}
10
</style>
11
<script type="text/javascript">
12
function moveCaption()
13
{
14
document.getElementById('myTable').style.captionSide="right";
15
}
16
</script>
17
</head>
18
<body>
19
20
<table border="1" id="myTable">
21
  <caption>This is a caption</caption>
22
  <tr>
23
    <td>100</td>
24
    <td>200</td>
25
  </tr>
26
  <tr>
27
    <td>300</td>
28
    <td>400</td>
29
  </tr>
30
</table>
31
<br />
32
<input type="button" onclick="moveCaption()" value="Move table caption">
33
34
</body>
35
</html>
36
            

查看结果:

请在上面的文本框中编辑您的代码,然后单击提交按钮测试结果。w3c0.com

W3c0.com 提供的内容仅用于培训。我们不保证内容的正确性。通过使用本站内容随之而来的风险与本站无关。W3c0 简体中文版的所有内容仅供测试,对任何法律问题及风险不承担任何责任。 当使用本站时,代表您已接受了本站的使用条款和隐私条款。版权所有,保留一切权利。 鲁ICP备15022115号