今天帮世杰写购物车,发现用attr remveAttr只能实现一轮全选与反选,因为dom里面的check="check"没有去掉。后来用.prop("checked",true)和.prop("checked",false)解决了。