代码篇——Easyui的formatter实现超链接跳转页面
2016-04-09 16:54
465 查看
formatter,easyui的一个格式化函数,可以实例化数据表格列。
具体事例:
具体代码:
datagrid表格中的一列的代码:
<th data-options="field:'id',width:100,formatter: rowformater">绑定考生</th>
对应的JS的代码:
@*点击超链接触发的事件+李芬*@
<script type="text/javascript">
//查看详情
function rowformater(value, row, index) {
return "<a href='/AddStudent/AddStudent?ExamPlaceID" + row.ExamPlaceID + "' target='_blank'>绑定考生</a>";
}
其中函数对应的三个参数,分别是value、row、index。
value:对应字段当前列的值
row:当前行的所有的值
index:一个标识,是从零开始的
基础性的代码,多多积累。
具体事例:
具体代码:
datagrid表格中的一列的代码:
<th data-options="field:'id',width:100,formatter: rowformater">绑定考生</th>
对应的JS的代码:
@*点击超链接触发的事件+李芬*@
<script type="text/javascript">
//查看详情
function rowformater(value, row, index) {
return "<a href='/AddStudent/AddStudent?ExamPlaceID" + row.ExamPlaceID + "' target='_blank'>绑定考生</a>";
}
其中函数对应的三个参数,分别是value、row、index。
value:对应字段当前列的值
row:当前行的所有的值
index:一个标识,是从零开始的
基础性的代码,多多积累。
相关文章推荐
- android学习第四天,其他UI控件
- iOS之UITabBar 的相关属性
- android 在线程中调用handle更新UI
- 使用runOnUiThread解决Handler无法调用含用子线程方法的问题
- Android Recovery Ui 分析
- UIImage的scale
- java中的Stack和Queue之间用法解释,还有heap
- LeetCode 187. Repeated DNA Sequences
- 232. Implement Queue using Stacks
- Range Sum Query - Immutable
- 代码篇——EasyUI中DataGrid选中多行提交和删除
- arduino随笔(2)
- QNX 实时操作系统(Quick Unix)
- Qt Quick实现的疯狂算数游戏
- Caligari TrueSpace
- iOS UITableView的用法
- iOS获取UUID,并使用keychain存储
- 复盘Build 2016:不要错过微软给.NET开发者的这些福利
- [LeetCode]63. Unique Paths II
- lintcode: Unique Paths II