jQuery遍历table并操作元素

//遍历id为“table_id”的table的所有行
$("#table_id").find("tr").each(function() {
        //获取第5列的元素
       var element = $(this).children('td:eq(5)');	
        //将第9列的元素的颜色设为红色
$(this).children('td:eq(9)').css("color", "red");
});


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章