【问题标题】:change the url of easyui datagrid on button click在按钮单击时更改easyui datagrid的url
【发布时间】:2013-07-31 10:51:15
【问题描述】:

我正在使用easyui datagrid

我添加了一个新按钮,该按钮将根据您选择的行使用另一组数据填充数据网格。

这是按钮:

a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="view-breakdown()">View Breakdown</a>    

这是我的桌子:

<table id="dg" title="My Users" class="easyui-datagrid" style="width:980px;height:370px;"
        url="get_users.php"
        toolbar="#toolbar" pagination="true"
        rownumbers="true" fitColumns="true" singleSelect="true" height="auto";>
    <thead>
        <tr>
        <th field="item_group_desc" width="50">item description</th>
        </tr>
    </thead>
</table>

我希望函数 view_breakdown() 获取 item_group_desc 的值并将表格的 url 更改为“breakdown.php” 我怎样才能做到这一点?提前谢谢

【问题讨论】:

    标签: jquery-easyui


    【解决方案1】:

    试试这样,

    view_breakdown()
    {
       $('#dg').datagrid({
          url:'breakdown.php'});
     }  
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-09
      • 2018-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多