mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-14 03:30:17 +01:00
62 lines
1.4 KiB
HTML
62 lines
1.4 KiB
HTML
<!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>
|
|
|