Notice
Recent Posts
Recent Comments
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Archives
Today
Total
관리 메뉴

Without haste, but without rest

[jquery] tr을 돌며 json 본문

삽질의 리포팅

[jquery] tr을 돌며 json

느린구름 2012. 3. 8. 10:45

var data={};
$('.tbl_task').find('tr').each(function(){
    var cls=$(this).attr('class');
    var row={};

$(this).find('td textarea').each(function(){
   row[$(this).attr('name')]=$(this).val();
});

  data[cls]=row;

  });

    console.log(data);