easyui最简单的数据绑定,绑定不上

gavinchengshubo 2015-04-23 06:05:17
$(function () {
LoadDataGrid(); //加载列表数据
});
//列表
function LoadDataGrid() {
$("#Infolist").datagrid({
loadMsg: '数据加载...',
url: 'lpdata.json',
columns: [[
{ field: 'tHI_Code', title: '楼盘code', width: 80, align: 'center' },
{ field: 'tHI_Name', title: '项目名称', width: 300, align: 'center' },
{ field: 'tBA_ID_District', title: '区域', width: 80, align: 'center' },
{ field: 'tHI_Clicks', title: '点击次数', width: 80, align: 'center' },
{ field: 'tHI_Published', title: '发布时间', width: 100, align: 'center' },
{ field: 'tHI_Updated', title: '更新时间', width: 120, align: 'center' }
]]
});
}
--表格table
<table id="Infolist">
</table>
--json数据
{
"total": 173,
"rows": [
{
"thi_id": "01fbaa5289434f2a9ce07682d1adf3e2",
"thi_code": "kaiyueguangchang0592",
"thi_name": "凯悦广场",
"tba_id_district": "001008000",
"thi_clicks": "151",
"thi_published": "2013/10/16 10:51:31",
"thi_updated": "2014/5/4 17:25:28"
},
{
"thi_id": "0b36583701a8439e9f5e20a6f1ab453a",
"thi_code": "guojilongjundz",
"thi_name": "大洲国际龙郡",
"tba_id_district": "001001000",
"thi_clicks": "19",
"thi_published": "2013/10/16 10:50:50",
"thi_updated": "2013/10/28 10:37:35"
}
]
}
...全文
102 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
全栈极简 2015-04-23
  • 打赏
  • 举报
回复
检查路径,检查jquery等js的引用(顺序)。

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧