1<html xmlns="http://www.w3.org/1999/xhtml"> 2<head> 3 4<script> 5 6var HTML_NS = "http://www.w3.org/1999/xhtml"; 7 8function foo() { 9 var table = document.getElementById("table"); 10 var newRow = document.createElementNS(HTML_NS, 'tr'); 11 table.insertBefore(newRow, document.getElementById('lastrow')); 12} 13 14 15doc = document; 16 17</script> 18 19</head> 20 21 22<body onload="setTimeout(foo, 300);"> 23 24 25<h3>Tables</h3> 26 27 28<table id="table" border="1" style="border-collapse: collapse"> 29 30 <tr> 31 <col></col> 32 <td rowspan="2">TD</td> 33 </tr> 34 35 <tr id="lastrow"> 36 <td width="50%">TD</td> 37 </tr> 38 39</table> 40 41 42</body> 43</html> 44