开发者

Datatable Row Items selection

How to get a particular row (entire column) values in the datatable, and how to re开发者_StackOverflowdirect these values to the next page?


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'));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜