1. 程式人生 > >easyui前臺顯示資料

easyui前臺顯示資料

<script type="text/javascript">
$(function(){
initTable();
});
function initTable(){
//init table
$("#tt").datagrid({
//cotrolle/action
url:'/Controller/Action',
title:'title',
width:700,
heigth:400,
fitColumns:true,
idField:'ID',
loadMsg:'正在載入使用者資訊',
pagination:true,
singleSelect:false,
pageSize:10,
pageNumber:1,
pageList:[10,20,30],
queryParams:{},
columns:[
[
{ field: 'ck', checkbox: true, align: 'left', width: 50 },
{ field: 'ID', title: '使用者的編號', width: 80 },
{ field: 'UName', title: '使用者名稱', width: 120 },
{ field: 'Pwd', title: '密碼', width: 120 },
{ field: 'Remark', title: '備註', width: 120 },


]
],
toolbar:[
 {
                        id: 'btnDownShelf',
                        text: '新增使用者',
                        iconCls: 'icon-add',
                        handler: function () {
                            //點選新增按鈕的時候,彈出一個新增的對話方塊
                            // alert("dd");
                            addClickEvent();
                        }
                    },
]
})
}
</script>