datatables ajax post请求 延迟显示

$('#resourceList').dataTable({
					 "aLengthMenu": [
					                    [10, 15, 20, -1],
					                    [10, 15, 20,30] // change per page values here
					                ],
			         "iDisplayLength": 10,
			         "ajax": {
			             "url": "resource/systemCheck.do",
			             "type": "POST",
			             "data":data
			         },
			         "sPaginationType": "bootstrap",
			         "bLengthChange": true,//改变每页显示数据数量
			         "bAutoWidth": false,//启用或禁用自动列宽度的计算。
			         "bFilter" : true,
			         "bDestroy" : true,
			         "bServerSide" : false,
			         "bSortClasses" : false,
			         "bSort" : false,
			         "bProcessing": true,
			         "oLanguage": {
			        	 "sProcessing": "正在加载中......",
			             "sLengthMenu": "每页显示: _MENU_",
			             "sZeroRecords": "对不起,查询不到相关数据!",
			             "sEmptyTable": "表中无数据存在!",
			             "sInfo": "当前显示 _START_ 到 _END_ 条,共 _TOTAL_ 条记录",
			             "sInfoFiltered": "数据表中共为 _MAX_ 条记录",
			             "sSearch": "搜索:",
			             "oPaginate": {
			                 "sFirst": "首页",
			                 "sPrevious": "上一页",
			                 "sNext": "下一页",
			                 "sLast": "末页"
			             }
			        },
			         "aoColumns": [
			               { "sClass": "center","mDataProp":"resultMsg", "sTitle": "检查项","sWidth": "12%"},
						   { "sClass": "center ","mDataProp":"resultKey", "sTitle": "结果","sWidth": "12%",
			            	   "mRender":function(data,type,row){
			            		   var html,tpl = '<span style="color:{0};">{1}</span>'
			            		   if("Noncompliance" == data){
			            			   html = tpl.format("#F00","不合规"); 
			            		   }else if("Compliance" == data){
			            			   html = tpl.format("#0F0","合规");
			            		   }
			            		   return html;
			            	   }},
			               { "sClass": "center","mDataProp":"resultKey",  "sTitle": "操作" ,"sWidth": "10%",
								"mRender" : function(data, type, row) {
									var html = "<span title='修正' id='edituserbutton"+data+"'  οnclick=\"$.resource.correctCheck(this)\" style='width: 20px; height: 20px; background: url(img/common/edit01.png) no-repeat center; display:inline-block;'></span>"
									return html;
								}},   
					],
					"fnDrawCallback" : function(oSettings) {
		
					}
				});

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值