$(function(){
$("#dg").datagrid({
url:'json.action',
remoteSort: false,
pagination:true,
toolbar:'#tb',
columns:[[
{field:'uid',title:'编号',width:100},
{field:'uname',title:'名字',width:100,editor:{type:'text',options: {required: true}}},
{field:'ucard',title:'身份证',width:100,editor:{type:'text',options: {required: true}}},
{field:'ugender',title:'性别',width:100,editor:{type:'text',options: {required: true}},sortable:true,formatter:function(value,index,row){
if(value==1){
return '男';
}else if(value==2){
return '女';
}
}},
{field:'uphone',title:'电话',width:100,editor:{type:'text',options: {required: true}}},
{field:'ucount',title:'人住人数',width:100,editor:{type:'text',options: {required: true}}}
]]
})
});
你的意思是指的页面假如有一个查询学生按钮,点击一下查询出来,再点击一下又出现了,是这意思么?,你可以在方法里查询完毕后把他们的ID改成统一的,然后就可以了,每次查询数据前,先将这些统一ID的html清空,再删除Id,就可以了
仅供参考,因为你用的这个框架我不会