绑定change事件就是了$(".gridview tr input[type=checkbox]").change(function(){$(this).parent().parent().toggleClass("alt")})