中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Table createTFoot() 方法

Table 對(duì)象參考手冊(cè) Table 對(duì)象

定義和用法

createTFoot() 方法用于在表格中獲取或創(chuàng)建 <tfoot> 元素。

注意:如果 tfoot 元素在表格中已經(jīng)存在, createTFoot() 方法返回存在的值,不會(huì)創(chuàng)建一個(gè)新的 <tfoot> 元素。

提示: 在表格中移除 tfoot 元素,請(qǐng)使用 deleteTFoot() 方法。

語法

tableObject.createTFoot()

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主要瀏覽器都支持 createTFoot() 方法


實(shí)例

實(shí)例

創(chuàng)建和刪除 tfoot 元素:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>小白教程(json.cn)</title>
<script>
function createTFoot(){
????var x=document.getElementById("myTable");
????if (!x.tFoot){
????????var footer=x.createTFoot();
????????var row=footer.insertRow(0);
????????var cell=row.insertCell(0);
????????cell.innerHTML="<b>This is a table footer</b>";
}
}
function deleteTFoot(){
????document.getElementById("myTable").deleteTFoot();
}
</script>
</head>
<body>

<table id="myTable" border="1">
????<tr>
????????<td>cell 1</td>
????????<td>cell 2</td>
????</tr>
????<tr>
????????<td>cell 3</td>
????????<td>cell 4</td>
????</tr>
</table>
<br>
<button type="button" onclick="createTFoot()">創(chuàng)建表格頁(yè)腳</button>
<button type="button" onclick="deleteTFoot()">刪除表格頁(yè)腳</button>

</body>
</html>

運(yùn)行代碼 ?

Table 對(duì)象參考手冊(cè) Table 對(duì)象其他擴(kuò)展