问个关于网页表格变换的问题
各位我有以个想法是想设定以个表格,当鼠标移动到它上面的时候其背景色变为黄色,且单击它可以指向一个连接
单击指向连接的这个我可以做但是,怎么移动给便背景颜色就不能做了。各位谁能给我一个好的办法,谢谢了
程序代码:
<table width="200" border="1" id="tbl">
<tr>
<td><A href="http://www. <td><A href="http://www. <td><A href="http://www. <td><A href="http://www. <td><A href="http://www. <td><A href="http://www. <td><A href="http://www. <td><A href="http://www. <td><A href="http://www. language="javascript">
tblObj = document.getElementById('tbl');
tds = tblObj.getElementsByTagName('td');
for(var i = 0; i < tds.length; i++)
{
tds[i].onmouseover = function(){this.style.backgroundColor = '#FF0';}
tds[i].onmouseout = function(){this.style.backgroundColor = '';}
}
</script>