我正在尝试从url http://www.datatables.net/examples/data_sources/server_side.html实现DataTable . 我在Visualforce apex(Salesforce)中开发它 . 以下是我的代码
/*$(document).ready(function() {
$.ajax({
type: "POST",
url: "/apex/HotStuckLeadReportAjaxPage",
data: { name: "John", location: "Boston" }
}).done(function( msg ) {
alert("Data Saved: " + msg );
});
});*/
//$.noConflict();
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/apex/HotStuckLeadReportAjaxPage"
} );
});
当我解开顶级Ajax函数时,它显示 [Object Object] 作为响应 . 但是,当我单独运行 HotStuckLeadReportAjaxPage 页面时,它会以JSON格式显示文本在_1361042中期望的DataTable: . 表中没有数据呈现 . 有什么问题? I always open any one jquery Ready function at single time when I run. 谢谢 .