前台
var str = $("#table_id ").combobox("getValue");
var model ={
title:str,
iconCls:'icon-save',
nowrap: false,
striped: true,
collapsible:false,
animate:true,
height:570,
url:'datagrid_data.json',
sortName: 'code',
sortOrder: 'desc',
remoteSort: false,
idField:'code',
frozenColumns:[[
{title:'医院',field:'hospital'}
]],
columns:[[]],
pagination:true,
rownumbers:true}
$("#div_top p").empty();
$("#div_top p").append(str);
var dateType;
if($("#month_rdo:checked").length>0){
dateType = '1';
}else if($("#season_rdo:checked").length>0){
dateType = '2';
}else{
dateType = '3';
}
$.ajax({
type: "GET",
data: { tableName:str,
dateType:dateType},
cache: false,
url: "<%=basePath%>/leadership/analysisAction.do?method=getColumn",
dataType: "json",
contentType:"application/x-www-form-urlencoded; charset=UTF-8",
success: function (result) {
model.columns = result;
$('#analysis_table').datagrid(model);
},
error: function (result) {
alert("系统繁忙,请稍后重试!");
}
});后台
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String page = request.getParameter("page"); // 取得当前页数,注意这是jqgrid自身的参数
String rows = request.getParameter("rows"); // 取得每页显示行数,,注意这是jqgrid自身的参数
jdk用的是1.6 获取出来 page 和rows都是null
var str = $("#table_id ").combobox("getValue");
var model ={
title:str,
iconCls:'icon-save',
nowrap: false,
striped: true,
collapsible:false,
animate:true,
height:570,
url:'datagrid_data.json',
sortName: 'code',
sortOrder: 'desc',
remoteSort: false,
idField:'code',
frozenColumns:[[
{title:'医院',field:'hospital'}
]],
columns:[[]],
pagination:true,
rownumbers:true}
$("#div_top p").empty();
$("#div_top p").append(str);
var dateType;
if($("#month_rdo:checked").length>0){
dateType = '1';
}else if($("#season_rdo:checked").length>0){
dateType = '2';
}else{
dateType = '3';
}
$.ajax({
type: "GET",
data: { tableName:str,
dateType:dateType},
cache: false,
url: "<%=basePath%>/leadership/analysisAction.do?method=getColumn",
dataType: "json",
contentType:"application/x-www-form-urlencoded; charset=UTF-8",
success: function (result) {
model.columns = result;
$('#analysis_table').datagrid(model);
},
error: function (result) {
alert("系统繁忙,请稍后重试!");
}
});后台
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String page = request.getParameter("page"); // 取得当前页数,注意这是jqgrid自身的参数
String rows = request.getParameter("rows"); // 取得每页显示行数,,注意这是jqgrid自身的参数
jdk用的是1.6 获取出来 page 和rows都是null
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货