0
我想呈现一些领域之前导出到我的函数中的excel我这样做;Datatable fnCellRender不呈现
"tableTools": {
"sSwfPath": "assets/global/plugins/data-tables/tabletools/swf/copy_csv_xls_pdf.swf",
"aButtons": [ {
"sExtends": "xls",
"sButtonText": "Excel",
"fnCellRender":function(sValue,iColumn,nTr,iDataIndex){
console.log(sValue);
//console.log($(sValue));
return sValue;
}
}, {
"sExtends": "print",
"sButtonText": lang.L_PRINT,
"sInfo": lang.L_PRINT_DESC,
"sMessage": "Metrics"
}]
}
所以,当我取消
console.log($(sValue));
它返回只是第一和第二列不包括里面所有的HTML标签。但是当它发现一个有html标签的值时,它会停止。
前 - 这得到VALU
<td class=" sorting_1">201408</td>
这并不
<span style="text-align:right;display:block;width:100%">121.25</span>
我怎样才能解决这个问题?