Easyui Datagrid每行增加超链接

Easyui Datagrid 的增删及超链接的增加在网上随处可见,我的项目中也用到挺多,记一下

利用Easyui框架为每行添加超链接:


这里用到的是easyui自带的formatter属性

<thead>
            <tr>
                <th data-options="field:'ck',width:50,checkbox:true,align:'center'"></th>
                <th data-options="field:'CName',width:120,align:'center',sortable:true,Filter:true">姓名</th>
                <th data-options="field:'CID',width:250,align:'center',sortable:true">身份证号</th>
                <th data-options="field:'Tel',width:150,align:'center',sortable:true">电话</th>
                <th data-options="field:'SDate',width:120,align:'center',sortable:true">申请时间</th> 
                <th data-options="field:'SState',width:120,align:'center',Filter:true">办结状态</th> 
                <th data-options="field:'Title',width:100,align:'center',formatter:rowformater">处理</th> 
            </tr>
        </thead>

<script type="text/javascript">
        function rowformater(value, row, index) {
            return "<a href='LoanApplyHandle.aspx?NoticeID=" + row.CMLoanApplyID + "' target='_self'>" + "处理" + "</a>";//_top,
        }
    </script>

其中,formatter属性的介绍可参见http://www.jeasyui.net/plugins/183.html

<a>标签的target属性可参见http://www.w3school.com.cn/tags/att_a_target.asp

这样就可以跳转到LoanApplyHandle.aspx页面进行其他操作。


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值