1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN style http://www.w3.org/TR/html4/strict.dtd">
5 window
.onload
= createTable
;
9 var oTable
= document
.createElement("table");
10 document
.body
.appendChild(oTable
);
11 oTable
.appendChild(document
.createElement("tbody"));
13 // THead creation block
14 var oTHead
= oTable
.createTHead();
15 var oRow
= oTHead
.insertRow(0);
16 for( var col
=0;col
<8;col
++)
18 var oCell
= oRow
.insertCell(col
);
19 var cellValue
= document
.createTextNode("h" + col
);
20 oCell
.appendChild(cellValue
);
24 // TFoot creation block
25 var oTFoot
= oTable
.createTFoot();
26 oRow
= oTFoot
.insertRow(0); // create table footer row
27 for(col
=0;col
<8;col
++)
29 oCell
= oRow
.insertCell(col
);
30 cellValue
= document
.createTextNode("f" + col
);
31 oCell
.appendChild(cellValue
);
34 for(var row
=0;row
<1;row
++) // ask for just 1 row
36 oRow
= oTable
.tBodies
[0].insertRow(row
);
37 for(col
=0;col
<8;col
++)
39 oCell
= oRow
.insertCell(col
);
40 var newValue2
= document
.createTextNode("r" + row
+ "c"
42 oCell
.appendChild(newValue2
);
49 str
+= ".rows.length: " + oTable
.rows
.length
+ "\n";
50 //str += ".tHead.rows.length: " + oTable.tHead.rows.length + "\n";
51 //str += ".tFoot.rows.length: " + oTable.tFoot.rows.length + "\n";
52 str
+= ".tBodies.length: " + oTable
.tBodies
.length
+ "\n";
53 str
+= ".tBodies[0].rows.length: " + oTable
.tBodies
[0].rows
.length