Jqweigts 表格查询数据 传递参数方法

formatData: A callback function which is called before the data is sent to the server. You can use it to fully override the data sent to the server. If you define a 'formatData' function, the result that the function returns will be sent to the server. 

dataAdapter = new $.jqx.dataAdapter(source,{
    	 
    	 loadError: function (xhr, status, error) { 
 	     },  
    	 formatData: function (data) {
			//官方demo 
			$.extend(data, {
			featureClass: "P",
			style: "full",
			maxRows: 50
			});
			return data;


			//自己定义的参数:
			data['name'] = $("#uname").val();

		}
	
}

 后台 request.getParameter("name");就可获取到值

相关推荐