jQuery EasyUI 数据网格 - 添加工具栏

jQuery EasyUI 教程 · 2019-04-06 13:17:48

本实例演示如何添加工具栏(toolbar)到数据网格(datagrid)。

创建数据网格(DataGrid)

    <table id="tt" class="easyui-datagrid" style="width:600px;height:250px"
            url="data/datagrid_data.json"
            title="DataGrid with Toolbar" iconCls="icon-save"
            toolbar="#tb">
        <thead>
            <tr>
                <th field="itemid" width="80">Item ID</th>
                <th field="productid" width="80">Product ID</th>
                <th field="listprice" width="80" align="right">List Price</th>
                <th field="unitcost" width="80" align="right">Unit Cost</th>
                <th field="attr1" width="150">Attribute</th>
                <th field="status" width="60" align="center">Stauts</th>
            </tr>
        </thead>
    </table>
    <div id="tb">
        <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:alert('Add')">Add</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true" onclick="javascript:alert('Cut')">Cut</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:alert('Save')">Save</a>
    </div>

我们不需要写任何的 javascript 代码,只需通过 'toolbar' 属性附加工具栏(toolbar)到数据网格(datagrid)。

下载 jQuery EasyUI 实例

jeasyui-datagrid-datagrid4.zip

点击查看所有 jQuery EasyUI 教程 文章: https://codercto.com/courses/l/42.html

查看所有标签

新媒体运营

新媒体运营

勾俊伟 / 人民邮电出版社 / 2018-5-1 / 39.80

本书全面介绍了新媒体运营以及新媒体运营各模块的具体内容。 第 1章重点介绍新媒体运营的基本概念,其中包括运营的定义、发展历史及专业术语; 第 2章重点介绍新媒体运营的职业发展,通过企业需求反推能力清单,引导读者全面了解新媒体运营的岗位及相关要求; 第3章重点介绍用户运营的方法与策略,包括描述用户画像、搭建用户体系、吸引精准用户及提升用户活跃度等具体技巧; 第4章重点介绍产品......一起来看看 《新媒体运营》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具