[Resolved] How to change table row color with JavaScript
Hi, all,
I have a question about javasrcipt. The following HTML page has a table composed of three rows. I wish to know how to find the yellow row and change its bgcolor to red? Use javascript.
Thank you very much for any suggestion!
xihu24
Code:
<html>
<script lauguage="javascript">
function findYellowRow(){
// implementation to change the row from yellow to red
// ?
}
</script>
<body>
<table>
<tr bgcolor=white><td>1</td></tr>
<tr bgcolor=yellow><td>2</td></tr>
<tr bgcolor=white><td>3</td></tr>
</table>
<form>
<input type="button" value="FindYellowRow" onClick="findYellowRow();">
</form>
</body>
</html>