实现表格隔行变色

<SCRIPT LANGUAGE=”JavaScript”>
$(document).ready(function(){
  $(".instore-table tr:even").css("background","#f6f7fa");
  $(".instore-table tr:even").attr("bg","#f6f7fa");
  $(".instore-table tr:odd").attr("bg","#fff");
  $(".instore-table tr").mouseover(function(){
    $(this).css("background","#939ec1");
    $(this).css("color","#fff");
  })
  $(".instore-table tr").mouseout(function(){
    var bgc = $(this).attr("bg");
    $(this).css("background",bgc);
    $(this).css("color","#111");
  });
})

</SCRIPT>

实现表格隔行变色,

 

posted @ 2016-01-19 14:46  qshting1028  阅读(217)  评论(0编辑  收藏  举报