$(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}}}
]]
})
});
map 从后台把数据取出来了,可是一刷新数据会重复
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- 我本狂儒 2017-09-06 01:12关注
你的意思是指的页面假如有一个查询学生按钮,点击一下查询出来,再点击一下又出现了,是这意思么?,你可以在方法里查询完毕后把他们的ID改成统一的,然后就可以了,每次查询数据前,先将这些统一ID的html清空,再删除Id,就可以了
仅供参考,因为你用的这个框架我不会解决 无用评论 打赏 举报
悬赏问题
- ¥15 chaquopy python 安卓
- ¥50 Kubernetes&Fission&Eleasticsearch
- ¥15 有没有帮写代码做实验仿真的
- ¥15 報錯:Person is not mapped,如何解決?
- ¥30 vmware exsi重置后登不上
- ¥15 易盾点选的cb参数怎么解啊
- ¥15 MATLAB运行显示错误,如何解决?
- ¥15 c++头文件不能识别CDialog
- ¥15 Excel发现不可读取的内容
- ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题