<table >
<tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr>
<tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr><tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr><tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr></table>
<tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr>
<tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr><tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr><tr onmousemove ="this.style.backgroundColor='yellow'" onmouseout ="this.style.backgroundColor='white'">
<td>变色</td>
</tr></table>
解决方案 »
- 想通过反射机制,得到String,Array等类的信息
- 写了一个validation的自定义方法, 但没有反应
- 高分求解https 和 http传值问题.
- ie中无法使用document.createElement和appendChild
- 为什么我用js向网页输出一个iframe 在src中连接一个swf文件 但是在IE6下总是提示文件下载呢?
- 双击闪出一个层,在层上点击一下再使它隐藏。如何实现,100求源码
- showModalDialog时 模态窗口里动态的获取母窗口的值 可以吗?
- 如何将"汉字"转换为"汉字"
- 提交表单时,判断某个按钮是否按下。
- js怎么正则匹配输入框输入的|和\n符号呀?急急急!
- 求救,关于事件冒泡的疑惑?
- 如何测得一张图片的左边坐标和顶部坐标
function change()
{
this.style.backgroundColor='yellow';
var len=document.Form1.tags("tr");
for (var i=0;i<len.length;i++)
{
if(len[i].style.backgroundColor=='yellow'&&len[i].id!=this.id)
{
len[i].style.backgroundColor='white';
}
}
}
</script>
<table >
<tr id=tr1 onclick ="change()" >
<td>变色</td></tr>
<tr id=tr2 onclick ="change()" >
<td>变色</td></tr>
<tr id=tr3 onclick ="change()" >
<td>变色</td></tr>
<tr id=tr4 onclick ="change()" >
<td>变色</td></tr>
<tr id=tr5 onclick ="change()" >
<td>变色</td></tr>
</table>