使用 jquery jtable 但不显示记录列表...在前端,当数据库中有 10 条记录时,此显示数据不可用。
<link href="themes/redmond/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
<link href="Scripts/jtable/themes/lightcolor/blue/jtable.css" rel="stylesheet" type="text/css" />
<script src="jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
<script src="jquery.jtable.min.js" type="text/javascript"></script>
<script src="jquery.jtable.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
//Prepare jTable
jQuery('#PeopleTableContainer').jtable({
title: 'Table of people',
paging: true,
pageSize: 2,
sorting: true,
defaultSorting: 'Name ASC',
actions: {
listAction: 'PersonActions.php?action=list',
createAction: 'PersonActions.php?action=create',
updateAction: 'PersonActions.php?action=update',
deleteAction: 'PersonActions.php?action=delete'
},
fields: {
id: {
key: true,
create: false,
edit: false,
list: false
},
name: {
title: 'Author Name',
width: '40%'
},
age: {
title: 'Age',
width: '20%'
},
RecordDate: {
title: 'Record date',
width: '30%',
type: 'date',
create: false,
edit: false
}
}
});
//Load person list from server
jQuery('#PeopleTableContainer').jtable('load');
});
</script>
</head>
<body>
<div id="PeopleTableContainer"></div>
</body>