欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

HTML DOM caption 屬性

定義和用法

caption 屬性設(shè)置或返回表格的 caption 元素。

<caption> 元素定義了一個(gè)表格標(biāo)題。<caption> 標(biāo)簽必須緊跟在 <table> 標(biāo)簽之后,每個(gè)表格僅能規(guī)定一個(gè) caption。通常,caption 會(huì)位于表格之上居中的位置。

語(yǔ)法

tableObject.caption=captionObject

實(shí)例

下面的例子可返回表格的 <caption> 元素的文本:

<html>
<head>
<script type="text/javascript">
function alertCaption()
  {
  alert(document.getElementById("table1").caption.innerHTML);
  }
</script>
</head>
<body>

<table id="table1" border="1">
<caption>This is a table caption</caption>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
</table>
<br />
<input type="button" onclick=alertCaption()
value="Alert table caption" />

</body>
</html>