1
我仍然要在本地主機上通過Web服務器嘗試它,但我認爲問題可能在其他地方。設置sSwfPath未在初始化中設置
我正在使用DataTables開發ASP.NET MVC中的解決方案,兩者之間的交互將非常輕鬆。
如果我設置在TableTools.js全部或到我的資源的相對路徑它的工作原理
TableTools.DEFAULTS = {
"sSwfPath": "http://localhost:51203/Content/copy_csv_xls_pdf.swf",
"sRowSelect": "none",
"sSelectedClass": null,
"fnPreRowSelect": null,
"fnRowSelected": null,
"fnRowDeselected": null,
"aButtons": [ "copy", "csv", "xls", "pdf", "print" ],
"oTags": {
"container": "div",
"button": "a", // We really want to use buttons here, but Firefox and IE ignore the
// click on the Flash element in the button (but not mouse[in|out]).
"liner": "span",
"collection": {
"container": "div",
"button": "a",
"liner": "span"
}
}
}所需的SWF路徑;
如果我嘗試在組件初始化中試用它,它似乎不會在初始化中分配它。
$('.ReservationTable').dataTable({
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": ["copy"],
"sSwfPath": "http://localhost:51203/Content/copy_csv_xls_pdf.swf"
}
});
任何提示?