牧佑
2017-01-17 06:27
采纳率: 66.7%
浏览 3.1k
已采纳

easyUI怎么在toolbar上添加combobox或者是select下拉选?

如题。就在这样的上面添加 怎么添加
toolbar: [{
, '-', {
text: '&nbsp文章名: &nbsp类型:'
}, {
iconCls: 'icon-search',
text: '查询',
handler: function () {
findMess();
}
我要实现一个 模糊搜索。现在要在加一个条件。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • 牧佑 2017-01-19 02:29
    已采纳

    谢谢啊。虽然没帮到我。还是感谢了

    点赞 1 打赏 评论
  • 上山养老虎 2017-01-17 06:54

    $('#dg').datagrid({
    toolbar:'#tb',
    });

    请选择selected=selected>[${menus.systemCode}]${menus.menuName }
    点赞 打赏 评论
  • 上山养老虎 2017-01-17 07:36

    datagrid参数中加这个属性toolbar:"#toolbar"

    点赞 打赏 评论
  •  <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>DataGrid Complex Toolbar - jQuery EasyUI Demo</title>
        <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
        <link rel="stylesheet" type="text/css" href="../demo.css">
        <script type="text/javascript" src="../../jquery.min.js"></script>
        <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
    </head>
    <body>
        <h2>DataGrid Complex Toolbar</h2>
        <p>The DataGrid toolbar can be defined from a &lt;div&gt; markup, so you can define the layout of toolbar easily.</p>
        <div style="margin:20px 0;"></div>
        <table class="easyui-datagrid" title="DataGrid Complex Toolbar" style="width:700px;height:250px"
                data-options="rownumbers:true,singleSelect:true,url:'datagrid_data1.json',method:'get',toolbar:'#tb',footer:'#ft'">
            <thead>
                <tr>
                    <th data-options="field:'itemid',width:80">Item ID</th>
                    <th data-options="field:'productid',width:100">Product</th>
                    <th data-options="field:'listprice',width:80,align:'right'">List Price</th>
                    <th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
                    <th data-options="field:'attr1',width:240">Attribute</th>
                    <th data-options="field:'status',width:60,align:'center'">Status</th>
                </tr>
            </thead>
        </table>
        <div id="tb" style="padding:2px 5px;">
            Date From: <input class="easyui-datebox" style="width:110px">
            To: <input class="easyui-datebox" style="width:110px">
            Language: 
            <select class="easyui-combobox" panelHeight="auto" style="width:100px">
                <option value="java">Java</option>
                <option value="c">C</option>
                <option value="basic">Basic</option>
                <option value="perl">Perl</option>
                <option value="python">Python</option>
            </select>
            <a href="#" class="easyui-linkbutton" iconCls="icon-search">Search</a>
        </div>
        <div id="ft" style="padding:2px 5px;">
            <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true"></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true"></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true"></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true"></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"></a>
        </div>
    </body>
    </html>
    
    点赞 打赏 评论

相关推荐