easyui datagrid数据网格

本文介绍如何使用EasyUI,一组基于jQuery的UI插件集合,来高效地创建功能丰富且美观的用户界面。通过具体示例展示了如何导入必要的资源文件,并构建嵌套面板、布局和数据网格等组件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

EasyUI是一组基于jQuery的UI插件集合,它的目标就是帮助web开发者更轻松的打造出功能丰富并且美观的UI界面。它的许多控件让我们不必写很复杂的javascript,从而极大地提高了开发效率。

<link rel="stylesheet" type="text/css" href="/js/easyui.css" />

<script type="text/javascript" src="/js/jquery.min.js"></script>

<script type="text/javascript" src="/js/jquery.easyui.min.js"></script>

记得先导入以上3个

先上效果:

<div class="easyui-panel" title="Nested Panel" data-options="width:'100%',minHeight:500,noheader:true,border:false" style="padding:10px;">
    <div class="easyui-layout" data-options="fit:true">
       <div data-options="region:'west',split:false" style="width:250px;padding:5px">
           <%@include file="content-category.jsp" %>
        </div>
        <div data-options="region:'center'" style="padding:5px">
            <table class="easyui-datagrid" id="contentList" data-options="toolbar:contentListToolbar,singleSelect:false,collapsible:true,pagination:true,method:'get',pageSize:20,url:'*******',queryParams:{categoryId:0}">
            <thead>
                <tr>
                    <th data-options="field:'id',width:30">ID</th>
                    <th data-options="field:'title',width:240,align:'center'">内容标题</th>
                    <th data-options="field:'subTitle',width:100,align:'center'">内容子标题</th>
                    <th data-options="field:'titleDesc',width:120,align:'center'">内容描述</th>
                    <th data-options="field:'url',width:60,align:'center',formatter:E3.formatUrl">内容连接</th>
                    <th data-options="field:'pic',width:50,align:'center',formatter:E3.formatUrl">图片</th>
                    <th data-options="field:'created',width:130,align:'center',formatter:E3.formatDateTime">创建日期</th>
                    <th data-options="field:'updated',width:130,align:'center',formatter:E3.formatDateTime">更新日期</th>
                </tr>
            </thead>
        </table>
        </div>
    </div>
</div>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值