RetroZilla/layout/html/tests/table/interactive/bug8398.html
2015-10-20 23:03:22 -04:00

57 lines
1.2 KiB
HTML

<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Show/Hide</title>
<script type="text/javascript">
/////////////////////////////////////////////
function ShowHide()
{
statusCell = GetTextCell("Cell_0");
statusCell.data = "Hello";
}
/////////////////////////////////////////////
function GetTextCell(aName)
{
var node = document.getElementById(aName);
if (node != null)
{
if (node.hasChildNodes)
{
var children = node.childNodes;
var length = children.length;
var count = 0;
while(count < length)
{
child = children[count];
if (child.nodeType == 3)
{
dump("found kid\n");
return child;
}
count++
}
}
}
return null;
}
</script>
</head>
The caption should be at the bottom
<BR>
<body>
<form method="POST" name="myform" action="">
<input type="button" value="Show/Hide" onclick="ShowHide()">
<table border="2">
<caption align="bottom">Caption text</caption>
<tbody>
<tr>
<td id="Cell_0">
&nbsp;
</table>
</form>
</body>
</html>