1、遍历常犯的错误,遍历中i没有赋值给中间量
for(var i = 0; i<len; i++){ var index = i; if(index % 2 ==1){ $($("#showItem .table_body li")[index]).addClass("zebra") } }
2、关于JQ获取设置属性。见随笔。