javascript

位置:IT落伍者 >> javascript >> 浏览文章

js代码-鼠标划过时整行变色


发布日期:2021年01月31日
 
js代码-鼠标划过时整行变色

<!DOCTYPE HTML PUBLIC "//WC//DTD HTML Transitional//EN"><html><head><script>function overIt(){ var the_obj = eventsrcElement; if(the_objtagNametoLowerCase() == "td"){ the_obj=the_objparentElement; the_objoBgc=the_objcurrentStylebackgroundColor; the_objoFc=the_objcurrentStylecolor; the_objstylebackgroundColor=#BAF; the_objstylecolor=; }}function outIt(){ var the_obj = eventsrcElement; if(the_objtagNametoLowerCase() == "td"){ the_obj=the_objparentElement; the_objstylebackgroundColor=the_objoBgc; the_objstylecolor=the_objoFc; the_objstyletextDecoration=; }}</script></head> <body><table border= width= onmouseover="overIt()" onmouseout="outIt()"><tr bgColor=#> <td>aaa</td><td>aaa</td><td>aaa</td><td>aaa</td></tr><tr bgColor=#> <td>aaa</td><td>aaa</td><td>aaa</td><td>aaa</td></tr><tr bgColor=#> <td>aaa</td><td>aaa</td><td>aaa</td><td>aaa</td></tr><tr bgColor=#> <td>aaa</td><td>aaa</td><td>aaa</td><td>aaa</td></tr><tr bgColor=#> <td>aaa</td><td>aaa</td><td>aaa</td><td>aaa</td></tr></table> </body></html>

上一篇:js简单实例处理url特殊符号&处理

下一篇:JS控制文本框textarea输入字数限制