Mega Code Archive

 
Categories / JavaScript Reference / Javascript Methods
 

CreateTFoot() Example

<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> <table id="myTable">     <thead id="th">         <tr>             <th>Cell 1</th>             <th>Cell 2</th>         </tr>     <tfoot id="tf">         <tr><td>Cell 3</td>             <td>Cell 4</td>         </tr> </table> <input type="button" value="Create foot" onclick="function1();"> <input type="button" value="Create head" onclick="function2();"> </body> </html>