Ligerui表格基本操作(一)

1.创建工程,导入lib包

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title></title>
    <script src="lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <link href="lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="JS/myData.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
    <script type="text/javascript">


        $(function () {
            $("#t1").ligerGrid({
                columns: [{name:"c1",display:"姓名"},
                { name: "c2", display: "性别",align:"left"},
                { name: "c3", display: "出生日期",width:200,minwidth:100 }
                ],
                width:600,
                data: row,
                usePager:true,
                pageSizeOptions:[5,8,15,20],
                pageSize:5
            })


        })
    
    </script>
</head>
<body>
<div id="t1"></div>
</body>

</html>


JS内容

var row = { Rows: [{ "c1": "刘德华", "c2": "男", "c3": "1981-01-01" },
         { "c1": "张学友", "c2": "男", "c3": "1971-09-18" },
         { "c1": "张信哲", "c2": "男", "c3": "1967-04-28" },
         { "c1": "李宇春", "c2": "女", "c3": "1991-02-18" },
         { "c1": "张也", "c2": "女", "c3": "1975-07-01" },
         { "c1": "张宇", "c2": "男", "c3": "1961-11-23" },
         { "c1": "林俊杰", "c2": "男", "c3": "1985-05-13" },
         { "c1": "谢霆锋", "c2": "男", "c3": "1935-05-13" },
         { "c1": "张惠妹", "c2": "女", "c3": "1965-05-13" },
         { "c1": "潘玮柏", "c2": "男", "c3": "1955-05-13" },
         { "c1": "胡彦斌", "c2": "男", "c3": "1976-08-23" }
          ]
}

效果如下

更多代码请访问源码坊


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值