concatenat data tables coums

2019-09-04 01:50发布

i try to create table through jquery now i successfully display table and data

if (re.length > 0) {
    $("#services_schdulue").append
    $('#services_schdulue thead').append(
        "<tr><th>Conactenate</th><th>frequency</th><th>FDuration</th><th>FMileage</th><th>Lperformed</th><th>Nddatetime</th><th>Ndmileage</th><th>Rfrequ</th><th>Rduration</th><th>RMileage</th></tr>"
    );

    for (var i = 0; i < re.length; i++) {
        if (re[i] !== null) {
            $('#services_schdulue tbody').append(
                '<tr><td>' + con  +
                '</td><td>' + re[i][0] +
                '</td><td>' + re[i][1] +
                '</td><td>' + re[i][2] +
                '</td><td>' + re[i][3] +
                '</td><td>' + re[i][4] +
                '</td><td>' + re[i][5] +
                '</td><td>' + re[i][6] +
                '</td><td>' + re[i][7] +
                '</td><td>' + re[i][8] +
                '</td><</tr>');
        }
    }
}

var myTable = $('#services_schdulue').DataTable();

I try to to concatenate like this

var con = re[i][0].concat(re[i][1], re[i][2]);

but this show wrong result this show result like this:

image

First column should be 6 month(s) 1000.

How to do that?

1条回答
登录 后发表回答