データテーブルの特定の行 (列全体) の値を取得する方法と、これらの値を次のページにリダイレクトする方法は?
1 に答える
0
Assuming you are talking about a HTML table, you can get all the cell data of a column, as an array, like this:
var col = $("#myTable tr td:nth-child(n)").map(function() {
return $(this).text();
}).get();
Where n is the index of the column you want.
To send them to another page, you can encode them and redirect:
window.location.href = '/foo.html?data=' + encodeURI(col.join('some-separator'));
于 2010-12-28T06:23:38.427 に答える