create
英 [kriˈeɪt] 美 [kriˈet]
vt.产生;创造,创作;封爵,把…封为(贵族)
vi.[英][俚]大发脾气,大发牢骚
第三人称单数: creates 现在分词: creating 过去式: created 过去分词: created
caption
英 [ˈkæpʃn] 美 [ˈkæpʃən]
n.字幕;标题,说明文字,字幕;第三档
vt.给(图片、照片等)加说明文字;在(文件等)上加标题;在…上加字幕
第三人称单数: captions 复数: captions 现在分词: captioning 过去式: captioned 过去分词: captioned
javascript createCaption()方法 语法
作用:为表格创建一个 caption 元素。
语法:tableObject.createCaption()
返回:返回一个 HTMLElement 对象,表示该表的 <caption> 元素。如果该表格已经有了标题,则返回它。如果该表没有 <caption> 元素,则创建一个新的空 <caption> 元素,把它插入表格,并返回它。
javascript createCaption()方法 示例
<html>
<head>
<script type="text/javascript">
function createCaption()
{
var x=document.getElementById('myTable').createCaption()
x.innerHTML="My table caption"
}
</script>
</head>
<body>
<table id="myTable" border="1">
<tr>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
</tr>
<tr>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
</tr>
</table>
<br />
<input type="button" onclick="createCaption()"
value="Create caption">
</body>
</html>运行实例 »
点击 "运行实例" 按钮查看在线实例