$('#example').dataTable({
"sDom": "rt",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/Home/GetSeachResultByInfo1/",
"aoColumns": [
null,
null,
null,
null,
null,
null,
null
],
"fnServerData": function (sSource, aoData, fnCallback) {
aoData.push({
"student_college": $("#SelectCollege").val(),
"student_department": $("#SelectDepartment").val(),
"student_specialty": $("#SelectSpecialty").val(),
"student_grade": $("#SelectGrade").val(),
"student_class": $("#SelectClass").val()
});
$.ajax({
"url": sSource,
"data": aoData,
"success": fnCallback,
"dataType": "json",
"type": "POST",
"cache": false,
"error": function () {
alert("DataTables warning: JSON data from server failed to load or be parsed. " +
"This is most likely to be caused by a JSON formatting error.");
}
});
}
});在MVC中怎么接收我传过去的值?
"sDom": "rt",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/Home/GetSeachResultByInfo1/",
"aoColumns": [
null,
null,
null,
null,
null,
null,
null
],
"fnServerData": function (sSource, aoData, fnCallback) {
aoData.push({
"student_college": $("#SelectCollege").val(),
"student_department": $("#SelectDepartment").val(),
"student_specialty": $("#SelectSpecialty").val(),
"student_grade": $("#SelectGrade").val(),
"student_class": $("#SelectClass").val()
});
$.ajax({
"url": sSource,
"data": aoData,
"success": fnCallback,
"dataType": "json",
"type": "POST",
"cache": false,
"error": function () {
alert("DataTables warning: JSON data from server failed to load or be parsed. " +
"This is most likely to be caused by a JSON formatting error.");
}
});
}
});在MVC中怎么接收我传过去的值?
具体用法 你可以参考官网:http://datatables.net/usage/server-sideDatatables交流群
http://bbs.sailit.cn/forum.php?mod=viewthread&tid=70&fromuid=4
欢迎来做客
"student_department": $("#SelectDepartment").val(),
"student_specialty": $("#SelectSpecialty").val(),
"student_grade": $("#SelectGrade").val(),
"student_class": $("#SelectClass").val() 这些 你后台 获取的时候 名字就是你自己定义的这些 不知道楼主问题出现在哪里