為了防止頁面引入的jquery版本沖突,var $jQuery_edit = $.noConflict(true);然后用$jQuery_edit代替原來的$,其它所有功能都正常,但是table匯出失效了!
<button type="button" class="" id="btnExport">匯出</button>
下面是匯出功能的js:
//匯出
function tableExport(){
$jQuery_edit('#tb_user_edit').tableExport(
{
type: 'excel',//匯出excel
escape: 'false' ,
ignoreColumn: [0], //忽略某一列的索引
fileName: '母豬檔案', //檔案名稱設定
worksheetName: 'sheet1', //表格作業區名稱
tableName: '母豬檔案',
excelstyles: ['background-color', 'color', 'font-size', 'font-weight']
}
)
}
$jQuery_edit$('#btnExport').bind('click', function () {
tableExport();
})
不知道是什么原因了,請教各位大俠!
uj5u.com熱心網友回復:
回來頂一下!!!轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/15331.html
標籤:JavaScript
上一篇:nginx 部署國密證書
下一篇:一些亂碼怎么知道是哪些漢字?
