一、参考文档地址
http://hemin.cn/jq/index.html
二、使用jquery实现table隔行变色
①
$(function{
$('#table tr:even').css('backgroundColor','red');
$('#table tr:odd').css('backgroundColor','blue');
})
②一行代码实现效果
$(function{
$('#table tr').filter(':even').css('backgroundColor','red').end().filter(':odd').css('backgroundColor','blue');
})