caption

英[?k?p?n]? ?美[?k?p??n]??

n.字幕;標(biāo)題,說明文字,字幕;第三檔

# vt.給(圖片、照片等)加說明文字;在(文件等)上加標(biāo)題;在…上加字幕

第三人稱單數(shù): captions 複數(shù): captions 現(xiàn)在分詞: captioning 過去式: captioned 過去分詞: captioned

side

英[sa?d]? ?美[sa?d]??

n.側(cè)面;方面;旁邊;面,邊

adj.側(cè)面的;旁邊的;次要的,枝節(jié)的;副的

vi.支持,同意;偏袒;附和;站在…一邊

##第三人稱單數(shù): sides 複數(shù): sides 現(xiàn)在分詞: siding 過去式: sided 過去分詞: sided

javascript 標(biāo)題Side 屬性 語法

作用:設(shè)定表格標(biāo)題的位置。

語法:Object.style.captionSide=top|bottom|left|right

javascript 標(biāo)題Side 屬性 範(fàn)例

<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>

執(zhí)行實例 ?

點擊 "執(zhí)行實例" 按鈕查看線上實例