<tr onmouseover="this.style.backgroundColor='red'" onmouseout="this.style.backgroundColor=''">
解决方案 »
- 请问高手们,下载文件的文件大小测算和显示,是如何实现的?谢谢。
- 在 xslt 样式表中怎么 调用 JS 脚本函数?
- IE9不支持SCRIPT脚本的SRC属性变更了
- 在ie8中能够自适高的js 在firefox就不行?
- 两个TextArea输入文本后高度同步问题
- HTML中的文字大小改变问题!?(谢谢)
- 关于Highcharts categories
- 怎么在一个页面中按另一个页面的按钮!!!
- 【求助】关于jq 全选、反选的兼容性问题
- 关于javascript的显示隐藏
- 模态窗口内部的事件如何的触发呢?着急啊,
- 大家来看看吧,当层数目较少时可以正常切换菜单图片,多的时候就不正常,超过30个层时连显示也成问题,为什么?急!!!!!
<tr onmouseover="over(this)" onmouseout="out(this)">
<td>a</td>
<td>a</td>
<td>a</td>
</tr>
<tr onmouseover="over(this)" onmouseout="out(this)">
<td>b</td>
<td>b</td>
<td>b</td>
</tr>
</table>
<script language="JavaScript">
<!--
function over(o){
o.style.backgroundColor='red'
if(event.srcElement.tagName=="TD")event.srcElement.style.backgroundColor='blue'
}
function out(o){
o.style.backgroundColor=''
if(event.srcElement.tagName=="TD")event.srcElement.style.backgroundColor=''
}
//-->
</script>
<table width=200>
<tr id=di1>
<td id=di2>a</td>
<td id=di3>a</td>
<td>a</td>
<td onmouseover="over(this)" onmouseout="out(this)">b</td>
<td>b</td>
<td>b</td>
</tr>
</table>
<script language="JavaScript">
<!--
function over(o){
o1.style.backgroundColor='red'
o2.style.backgroundColor='red'
o3.style.backgroundColor='red'
if(event.srcElement.tagName=="TD")event.srcElement.style.backgroundColor='blue'
}
function out(o){
o1.style.backgroundColor=''
o2.style.backgroundColor=''
o3.style.backgroundColor=''
if(event.srcElement.tagName=="TD")event.srcElement.style.backgroundColor=''
}
//-->
</script> 还有其它方法吗?