使用jTable上的listAction从json文件加载数据
我是爪哇的一只新蜜蜂。。。 我不能解决它,我相信它很容易,所以我想知道是否有人可以帮助我,请。。。 所以,我想使用jTable插件查看html中的json数据,,,请提供一些帮助 使用netbeans,我的test.json文件的格式为使用jTable上的listAction从json文件加载数据,json,jtable,load,Json,Jtable,Load,我是爪哇的一只新蜜蜂。。。 我不能解决它,我相信它很容易,所以我想知道是否有人可以帮助我,请。。。 所以,我想使用jTable插件查看html中的json数据,,,请提供一些帮助 使用netbeans,我的test.json文件的格式为 { "Result": "OK", "TotalRecordCount": 23, "Records": [ { "vEmail": "miad@gmail1.com", "vUserName": "admin",
{
"Result": "OK",
"TotalRecordCount": 23,
"Records": [
{
"vEmail": "miad@gmail1.com",
"vUserName": "admin",
"nDepartmentId": "652",
"nEnabled": "1",
"department": 62,
"vFatherName": "mixalis",
"vSurname": "mixalis",
"vAfm": "5678678",
"vUsertype": "",
"vName": "mixalis",
"nId": "5651",
"rolesDesc": ""
},
<link rel="stylesheet" href="/test/css/template.css" type="text/css" />
<!-- Include one of jTable styles. -->
<link href="/test/jtable/themes/metro/blue/jtable.min.css" rel="stylesheet" type="text/css" />
<!-- Include jTable script file. -->
<script src="/test/jtable/jquery.jtable.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#PersonTableContainer').jtable({
title: 'Kyriakos Test with Table of Persons',
actions: {
listAction: '/test/test.json'
},
fields: {
PersonId: {
key: true,
list: false
},
vEmail: {
title: 'Email',
width: '8.3%'
},
vUserName: {
title: 'User Name',
width: '8.3%'
},
nDepartment: {
title: 'Department',
width: '8.3%'
},
nEnabled: {
title: 'Enabled',
width: '8.3%'
},
department: {
title: 'Department',
width: '8.3%'
},
vFatherName: {
title: 'Father Name',
width: '8.3%'
},
vSurname: {
title: 'Surname',
width: '8.3%'
},
vAfm: {
title: 'Afm',
width: '8.3%'
},
vUsertype: {
title: 'User Type',
width: '8.3%'
},
vName: {
title: 'Name',
width: '8.3%'
},
nId: {
title: 'Id',
width: '8.3%'
},
rolesDesc: {
title: 'Roles Desc',
width: '8.3%'
}
}
$('#PersonTableContainer').jtable('load');
});
});
等等,在我的代码中使用了listAction url和load方法,但我在这里缺少了smthg??它是什么?它是一个支架吗?它是一架飞机吗?它是一列火车吗?它不是超人…(这是一个笑话),
我的代码
<link rel="stylesheet" href="/test/css/template.css" type="text/css" />
<!-- Include one of jTable styles. -->
<link href="/test/jtable/themes/metro/blue/jtable.min.css" rel="stylesheet" type="text/css" />
<!-- Include jTable script file. -->
<script src="/test/jtable/jquery.jtable.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#PersonTableContainer').jtable({
title: 'Kyriakos Test with Table of Persons',
actions: {
listAction: '/test/test.json'
},
fields: {
PersonId: {
key: true,
list: false
},
vEmail: {
title: 'Email',
width: '8.3%'
},
vUserName: {
title: 'User Name',
width: '8.3%'
},
nDepartment: {
title: 'Department',
width: '8.3%'
},
nEnabled: {
title: 'Enabled',
width: '8.3%'
},
department: {
title: 'Department',
width: '8.3%'
},
vFatherName: {
title: 'Father Name',
width: '8.3%'
},
vSurname: {
title: 'Surname',
width: '8.3%'
},
vAfm: {
title: 'Afm',
width: '8.3%'
},
vUsertype: {
title: 'User Type',
width: '8.3%'
},
vName: {
title: 'Name',
width: '8.3%'
},
nId: {
title: 'Id',
width: '8.3%'
},
rolesDesc: {
title: 'Roles Desc',
width: '8.3%'
}
}
$('#PersonTableContainer').jtable('load');
});
});
$(文档).ready(函数(){
$(“#PersonTableContainer”).jtable({
标题:“Kyriakos测试和人员表”,
行动:{
listAction:“/test/test.json”
},
字段:{
人物:{
关键:没错,
列表:false
},
电子邮件:{
标题:“电子邮件”,
宽度:“8.3%”
},
Vuser名称:{
标题:“用户名”,
宽度:“8.3%”
},
D部门:{
标题:"部门",,
宽度:“8.3%”
},
已启用:{
标题:“已启用”,
宽度:“8.3%”
},
部门:{
标题:"部门",,
宽度:“8.3%”
},
vFatherName:{
标题:“父亲的名字”,
宽度:“8.3%”
},
vSurname:{
标题:“姓氏”,
宽度:“8.3%”
},
vAfm:{
标题:“Afm”,
宽度:“8.3%”
},
Vuser类型:{
标题:“用户类型”,
宽度:“8.3%”
},
vName:{
标题:“姓名”,
宽度:“8.3%”
},
nId:{
标题:“Id”,
宽度:“8.3%”
},
角色描述:{
标题:“角色描述”,
宽度:“8.3%”
}
}
$('PersonTableContainer').jtable('load');
});
});
<link rel="stylesheet" href="/test/css/template.css" type="text/css" />
<!-- Include one of jTable styles. -->
<link href="/test/jtable/themes/metro/blue/jtable.min.css" rel="stylesheet" type="text/css" />
<!-- Include jTable script file. -->
<script src="/test/jtable/jquery.jtable.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#PersonTableContainer').jtable({
title: 'Kyriakos Test with Table of Persons',
actions: {
listAction: '/test/test.json'
},
fields: {
PersonId: {
key: true,
list: false
},
vEmail: {
title: 'Email',
width: '8.3%'
},
vUserName: {
title: 'User Name',
width: '8.3%'
},
nDepartment: {
title: 'Department',
width: '8.3%'
},
nEnabled: {
title: 'Enabled',
width: '8.3%'
},
department: {
title: 'Department',
width: '8.3%'
},
vFatherName: {
title: 'Father Name',
width: '8.3%'
},
vSurname: {
title: 'Surname',
width: '8.3%'
},
vAfm: {
title: 'Afm',
width: '8.3%'
},
vUsertype: {
title: 'User Type',
width: '8.3%'
},
vName: {
title: 'Name',
width: '8.3%'
},
nId: {
title: 'Id',
width: '8.3%'
},
rolesDesc: {
title: 'Roles Desc',
width: '8.3%'
}
}
$('#PersonTableContainer').jtable('load');
});
});
什么是??哦,我很困惑…
<link rel="stylesheet" href="/test/css/template.css" type="text/css" />
<!-- Include one of jTable styles. -->
<link href="/test/jtable/themes/metro/blue/jtable.min.css" rel="stylesheet" type="text/css" />
<!-- Include jTable script file. -->
<script src="/test/jtable/jquery.jtable.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#PersonTableContainer').jtable({
title: 'Kyriakos Test with Table of Persons',
actions: {
listAction: '/test/test.json'
},
fields: {
PersonId: {
key: true,
list: false
},
vEmail: {
title: 'Email',
width: '8.3%'
},
vUserName: {
title: 'User Name',
width: '8.3%'
},
nDepartment: {
title: 'Department',
width: '8.3%'
},
nEnabled: {
title: 'Enabled',
width: '8.3%'
},
department: {
title: 'Department',
width: '8.3%'
},
vFatherName: {
title: 'Father Name',
width: '8.3%'
},
vSurname: {
title: 'Surname',
width: '8.3%'
},
vAfm: {
title: 'Afm',
width: '8.3%'
},
vUsertype: {
title: 'User Type',
width: '8.3%'
},
vName: {
title: 'Name',
width: '8.3%'
},
nId: {
title: 'Id',
width: '8.3%'
},
rolesDesc: {
title: 'Roles Desc',
width: '8.3%'
}
}
$('#PersonTableContainer').jtable('load');
});
});
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="/test/css/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="/test/js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="/test/js/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="/test/css/template.css" type="text/css" />
<!-- Include one of jTable styles. -->
<link href="/test/jtable/themes/metro/blue/jtable.min.css" rel="stylesheet" type="text/css" />
<!-- Include jTable script file. -->
<script src="/test/jtable/jquery.jtable.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#PersonTableContainer').jtable({
title: 'Kyriakos Test with Table of Persons',
actions: {
listAction: '/test/test.json',
createAction: '/GettingStarted/CreatePerson',
updateAction: '/GettingStarted/UpdatePerson',
deleteAction: '/GettingStarted/DeletePerson'
},
fields: {
PersonId: {
key: true,
list: false
},
vEmail: {
title: 'Email',
width: '8.3%'
},
vUserName: {
title: 'User Name',
width: '8.3%'
},
nDepartment: {
title: 'Department',
width: '8.3%'
},
nEnabled: {
title: 'Enabled',
width: '8.3%'
},
department: {
title: 'Department',
width: '8.3%'
},
vFatherName: {
title: 'Father Name',
width: '8.3%'
},
vSurname: {
title: 'Surname',
width: '8.3%'
},
vAfm: {
title: 'Afm',
width: '8.3%'
},
vUsertype: {
title: 'User Type',
width: '8.3%'
},
vName: {
title: 'Name',
width: '8.3%'
},
nId: {
title: 'Id',
width: '8.3%'
},
rolesDesc: {
title: 'Roles Desc',
width: '8.3%'
}
}
});
$('#PersonTableContainer').jtable('load');
});
</script>
</head>
<body>
<div id="PersonTableContainer"></div>
</body>
</html>
$(文档).ready(函数(){
$(“#PersonTableContainer”).jtable({
标题:“Kyriakos测试和人员表”,
行动:{
listAction:“/test/test.json”,
createAction:“/GettingStarted/CreatePerson”,
updateAction:“/GettingStarted/UpdatePerson”,
deleteAction:“/GettingStarted/DeletePerson”
},
字段:{
人物:{
关键:没错,
列表:false
},
电子邮件:{
标题:“电子邮件”,
宽度:“8.3%”
},
Vuser名称:{
标题:“用户名”,
宽度:“8.3%”
},
D部门:{
标题:"部门",,
宽度:“8.3%”
},
已启用:{
标题:“已启用”,
宽度:“8.3%”
},
部门:{
标题:"部门",,
宽度:“8.3%”
},
vFatherName:{
标题:“父亲的名字”,
宽度:“8.3%”
},
vSurname:{
标题:“姓氏”,
宽度:“8.3%”
},
vAfm:{
标题:“Afm”,
宽度:“8.3%”
},
Vuser类型:{
标题:“用户类型”,
宽度:“8.3%”
},
vName:{
标题:“姓名”,
宽度:“8.3%”
},
nId:{
标题:“Id”,
宽度:“8.3%”
},
角色描述:{
标题:“角色描述”,
宽度:“8.3%”
}
}
});
$('PersonTableContainer').jtable('load');
});