event.srcElement+表格应用
更新时间:2006年08月29日 00:00:00 作者:
<script language="JavaScript1.2">
function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}
function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
</script>
<table onMouseOver="changeto('white')" onMouseOut="changeback('#999999')">
function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}
function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
</script>
<table onMouseOver="changeto('white')" onMouseOut="changeback('#999999')">
相关文章
element必填校验输入空格问题修改正则表达式、请求拦截器实现所有输入框去除首尾空格(推荐)
这篇文章主要介绍了element必填校验输入空格问题修改正则表达式、请求拦截器实现所有输入框去除首尾空格,本文通过图文实例代码相结合给大家讲解的非常详细,感兴趣的朋友跟随小编一起看看吧2024-02-02JS遍历JSON数组及获取JSON数组长度操作示例【测试可用】
这篇文章主要介绍了JS遍历JSON数组及获取JSON数组长度操作,涉及javascript简单json数组遍历与运算相关操作技巧,需要的朋友可以参考下2018-12-12
最新评论