20 lines
386 B
HTML
20 lines
386 B
HTML
<html>
|
|
<head>
|
|
<title>Dynamic Table Row Cell Array Test</title>
|
|
<script>
|
|
function color(obj) {
|
|
for (var i=0; i < obj.cells.length; i++) {
|
|
|
|
obj.cells[i].style.backgroundColor = '#FFFFCC';
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<table border=0>
|
|
<tr id="t"><td>Cell One<td>Cell Two<td>Cell Three</table>
|
|
</table>
|
|
<script>
|
|
color(document.getElementById('t'))
|
|
</script>
|