标签:jquery
<style> .tr_color{ background-color:#ffffff; } .tr_color_hover{ background-color:blanchedalmond; } </style> <script type="text/javascript"> function mover(obj){ $(obj).children("td").each(function(){ $(this).removeClass("tr_color"); $(this).addClass("tr_color_hover"); }) } function mback(obj){ $(obj).children("td").each(function(){ $(this).removeClass("tr_color_hover"); $(this).addClass("tr_color"); })} </script> <tr onmouseover="mover(this)" onmouseout="mback(this)"> <td height="18" class="tr_color"> </tr>
<script type="text/javascript"> function mover(obj){ $(obj).children("td").each(function(){ $(this).attr("bgColor","#eafcd5") }) } function mback(obj){ $(obj).children("td").each(function(){ $(this).attr("bgColor","#FFFFFF") })} </script> <tr onmouseover="mover(this)" onmouseout="mback(this)"> <td height="18"bgColor="#FFFFFF"> </tr>
标签:jquery
原文地址:http://blog.csdn.net/w5167839/article/details/40744007