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