2016-09-15 5 views
0

난 내가 아래와 같이 열 당 하나 개의 입력이있는 경우 값을 얻는 방법을 알고하는 DataTables 내가 같은 열에서이 개 입력을 설정해야 느릅 나무가 있습니다하나의 DataTables 열에 여러 입력 값을 가져 오는 방법은 무엇입니까?

var table = $('#example').DataTable(); 

table.rows().every(function (rowIdx, tableLoop, rowLoop) {  
    var cell = table.cell({ row: rowIdx, column: 0 }).node(); 

    console.log($('input', cell).val()); 
}); 
내가 두 값이 얻을 수있는 방법

?

table.cell({row: rowIdx, column:0}).node().find('#inputOne'); 

답변

0

배열에

var values = $(cell).find(':input').map(function(){ 
    return this.value 
}).get(); 
console.log(values); 
+0

감사 값을지도! 그것은 완벽하게 작동합니다! –

관련 문제