JQuery鼠標滑過表格變色

 
   <style>
    .over { background-color:#77DDFF;}  //定義鼠標滑過的顏色
 </style>
 <script type="text/javascript">
   $(function(){
          $("#table1 tr").hover(function(){  //table1  指的是一個table的ID
           $(this).addClass("over");
           },function(){
            $(this).removeClass("over");
            });
         });
   </script>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章