thinkuncle / thinkuncle.github.io

thinkuncle
4 stars 0 forks source link

jquery基本操作 #106

Open thinkuncle opened 8 years ago

thinkuncle commented 8 years ago

jquery 遍历控件

$("#mytable").find("input[type='checkbox']").each(function(a, inpxt){
        var id = $(inpxt).attr("id");
        console.log(id);
});

jquery 遍历数组

$.each(data, function(idx, obj) {
      console.log(obj);
});