JavaScript Reference/Javascript Methods/createTFoot

Материал из Web эксперт
Перейти к: навигация, поиск

"createTFoot()" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1() {

  var m = document.all.myTable.createTFoot();
  m.bgColor = "red"; 

} function function2() {

  var n = document.all.myTable.createTHead();
  n.bgColor = "yellow"; 

} </script>

<thead id="th"> <tfoot id="tf">
Cell 1 Cell 2
Cell 3 Cell 4

<input type="button" value="Create foot" onclick="function1();"> <input type="button" value="Create head" onclick="function2();"> </body> </html>


     </source>
   
  


"createTFoot()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+

| Applied_To | | +----------------+--------------------------------------------------------------+ </source>

"createTFoot()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Create empty <tfoot> rows for the table.

Syntax:

document.getElementById("tableID").createTFoot() document.all.tableID.createTFoot() // IE only document.getElementById("tableID").createTHead() document.all.tableID.createTHead() // IE only


</source>