AnthonyChenny 2018-01-18 02:35 采纳率: 62.5%
浏览 1986
已采纳

easyui如何获得checkbox下选中的项

 <div id="top_country" >
                                    <div id="selected_country" style="border: 1px solid #E2F0F9;width:100%;height:200px;"> 
                                        <table id="dg"  class="easyui-datagrid"  style="font-size:10px;height: 200px;"
                                          url="<%=basePath%>region/queryallCountry" rownumbers="true" fitColumns="true">
                                            <thead> 
                                                <tr> 
                                                    <th hidden="true" field="uuid" width="100px">uuid</th>  
                                                    <th field="ck" checkbox=true></th>
                                                    <th field="countryname" width="100px"  halign="center">国家列表</th>  

                                                </tr> 
                                            </thead> 
                                            <tbody>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>![图片说明](https://img-ask.csdn.net/upload/201801/18/1516242896_612248.jpg)

                                想把选中的项append到右边
  • 写回答

7条回答 默认 最新

  • IT迷你白 2018-01-18 02:54
    关注

    我看你这个是在Datagrid上加入复选按钮 那就调用datagrid 的API $("#dg").datagrid("getSelections")这个会返回所有rows
    或者是 1.3版本之后的 $("#dg").datagrid("getChecked") 这个方法也是返回所有选中的行 我一般用第一个

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备