1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4
<style type="text/css">
6
border-collapse: collapse;
10
border: 1px solid blue;
15
<body onLoad=handleOnLoad()>
17
The table below has two rows with blue borders.<br>
18
If we add a new similar row using DHTML the borders disappear. They may although
19
show up in small bits and pieces depending on what you do hereafter (using the
20
menus, opening other windows, and various other things).<p>
43
function handleOnLoad()
45
var table = document.getElementById("myTable");
47
alert("Now we add a new row");
49
// Add a new row at the end of the table
50
var newRow = table.insertRow(3);
53
for (var i=0 ; i<3 ; ++i)
57
cell = document.createElement("TD");
59
cell.innerHTML = "C"+(i+1);
60
newRow.appendChild(cell);
64
cell = newRow.insertCell(i);
66
cell.innerHTML = "C"+(i+1);