52,797
社区成员
发帖
与我相关
我的任务
分享
$(document).ready(function(){
jQuery("#table1").jqGrid({
url:'showUser.do',
datatype: 'json',
colNames:['编号','姓名','密码','年龄','地址','出生日期'],
colModel:[
{name:'id',index:'id', width:90,sorttype:"int"},
{name:'username',index:'name', width:110,sorttype:"int"},
{name:'password',index:'password', width:80},
{name:'age',index:'age', width:80},
{name:'address',index:'address', width:80},
{name:'time',index:'time', width:80,sorttype:"date"}
],
rowNum:10,
rowList:[10,20,30],
pager: "pager1",
multiselect: false,
sortname: 'id',
viewrecords: true,
sortorder: "desc",
caption: "jqGrid test",
onSelectRow:function(id){
jQuery("#table2").jqGrid({
url:'showUserinfo.do?user_id='+id,
datatype: 'json',
colNames:['所在省','所在市','所在区'],
.......
}
});
事件有没有执行,后台的代码有没有运行。加个时间戳在url后面,去下缓存看看