exportar
function detailFormatter(index, row) { var html = []; $.each(row, function (key, value) { html.push('
' + key + ': ' + value + '
'); }); return html.join(''); }
function DoOnCellHtmlData(cell, row, col, data) { var result = ""; if (typeof data != 'undefined' && data != "") { var html = $.parseHTML(data);
$.each( html, function() { if ( typeof $(this).html() === 'undefined' ) result += $(this).text(); else if ( typeof $(this).attr('class') === 'undefined' || $(this).hasClass('th-inner') === true ) result += $(this).html(); }); } return result; }
$(function () { $('#toolbar').find('select').change(function () { $('#table').bootstrapTable('refreshOptions', { exportDataType: $(this).val() }); }); })
$(document).ready(function() { $('#table').bootstrapTable('refreshOptions', { exportOptions: {ignoreColumn: [0,1], // or as string array: ['0','checkbox'] onCellHtmlData: DoOnCellHtmlData} }); });
Data
Rank | Flag | teste | Population | Date | % of world | Language |
---|