$(function () { $('#sampleTable').DataTable(); }); function vul_result(nid){ const data = { "result": nid, }; $.ajax({ type: 'GET', url: '/vulnerability', data: data, dataType: 'json', success: function(result) { var json_result = JSON.stringify(result, null, 4); $('#scan_target_list').html("
" + json_result + "
"); }, error: function(xhr, type) { } }); }