RetroZilla/layout/html/tests/table/interactive/bug91934.html

62 lines
1.4 KiB
HTML
Raw Normal View History

2015-10-21 05:03:22 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
TD
{
border: 1px solid;
width:125px;
}
</style>
<script>
window.onload = windowLoad;
function windowLoad()
{
var newTable = document.createElement("table");
newTable.id = "newTable";
for(var y=0;y<5;y++)
{
var newRow = newTable.insertRow(y);
for(x=0;x<5;x++)
{
var newCell = newRow.insertCell(x);
if(y == 0 && x == 4)
{
newCell.appendChild(document.createTextNode("A looooooooooooooooooooooooooooooooooooooooong string"));
}
else
{
newCell.appendChild(document.createTextNode("r" + y + "c" + x));
}
}
}
document.body.appendChild(newTable);
}
function modify()
{
var t = document.getElementById("newTable");
var cell = t.rows[0].cells[4];
cell.firstChild.nodeValue = "A short string";
}
</script>
</head>
<body>
<form>
<input type="button" onclick="modify();" value="(1) Fill cell with lshort string"><br>
</form>
</body>
</html>