67,512
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"
href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
href="http://www.jeasyui.com/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css"
href="http://www.jeasyui.com/easyui/demo/demo.css">
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script type="text/javascript"
src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
var data = {
"rows" : [ {
"productid" : "FI-SW-01",
"productname" : "Koi",
"unitcost" : 10.00,
"status" : "P",
"listprice" : 36.50,
"attr1" : "Large",
"itemid" : "EST-1"
}, {
"productid" : "K9-DL-01",
"productname" : "Dalmation",
"unitcost" : 12.00,
"status" : "P",
"listprice" : 18.50,
"attr1" : "Spotted Adult Female",
"itemid" : "EST-10"
}, ]
};
$(function() {
$("#tt")
.datagrid(
{
title : 'Editable DataGrid',
iconCls : 'icon-edit',
width : 740,
height : 250,
singleSelect : true,
data : data,
columns : [ [ {
field : 'item',
width : 80,
title : 'idd',
formatter : function(v, o) {
var param = JSON.stringify(o);
return "<a href='javascript:void(0)' onclick='pushDetail("
+ param + ")'>详情</a>";
}
} ] ]
})
});
function pushDetail(d) {
console.log(d)
}
</script>
</head>
<body>
<table id="tt"></table>
</body>
</html>
年 半年广东省房屋市政工程安全生产文明施工示范工地申报项目汇总表 | |
地区(部门)公 章: | 报送时间: 年 月 日 |
Columns[index][i].rowspan != 'undefined' && frozenColumns[index][i].rowspan > 1) { tableString += ' rowspan="' + frozenColumns[index][i].rowspan + '"'; } if (typeof frozenColumns[index][i].colspan != 'undefined' && frozenColumns[index][i].colspan > 1) { tableString += ' colspan="' + frozenColumns[index][i].colspan + '"'; } if (typeof frozenColumns[index][i].field != 'undefined' && frozenColumns[index][i].field != '') { nameList += ',{"f":"' + frozenColumns[index][i].field + '", "a":"' + frozenColumns[index][i].align + '"}'; } tableString += '>' + frozenColumns[0][i].title + ' | '; } } } for (var i = 0; i < columns[index].length; ++i) { if (!columns[index][i].hidden) { tableString += '\ncolumns[index][i].rowspan != 'undefined' && columns[index][i].rowspan > 1) { tableString += ' rowspan="' + columns[index][i].rowspan + '"'; } if (typeof columns[index][i].colspan != 'undefined' && columns[index][i].colspan > 1) { tableString += ' colspan="' + columns[index][i].colspan + '"'; } if (typeof columns[index][i].field != 'undefined' && columns[index][i].field != '') { nameList += ',{"f":"' + columns[index][i].field + '", "a":"' + columns[index][i].align + '"}'; } tableString += '>' + columns[index][i].title + ' | '; } } tableString += '\n
---|---|
'; if (e + 2 == nl[j].f.length) { tableString += rows[i][nl[j].f.substring(0, e)]; } else tableString += rows[i][nl[j].f]; tableString += ' | '; }); tableString += '\n
Columns[index][i].rowspan != 'undefined' && frozenColumns[index][i].rowspan > 1) { tableString += ' rowspan="' + frozenColumns[index][i].rowspan + '"'; } if (typeof frozenColumns[index][i].colspan != 'undefined' && frozenColumns[index][i].colspan > 1) { tableString += ' colspan="' + frozenColumns[index][i].colspan + '"'; } if (typeof frozenColumns[index][i].field != 'undefined' && frozenColumns[index][i].field != '') { nameList.push(frozenColumns[index][i]); } tableString += '>' + frozenColumns[0][i].title + ' | '; } } } for (var i = 0; i < columns[index].length; ++i) { if (!columns[index][i].hidden) { tableString += '\ncolumns[index][i].rowspan != 'undefined' && columns[index][i].rowspan > 1) { tableString += ' rowspan="' + columns[index][i].rowspan + '"'; } if (typeof columns[index][i].colspan != 'undefined' && columns[index][i].colspan > 1) { tableString += ' colspan="' + columns[index][i].colspan + '"'; } if (typeof columns[index][i].field != 'undefined' && columns[index][i].field != '') { nameList.push(columns[index][i]); } tableString += '>' + columns[index][i].title + ' | '; } } tableString += '\n
---|---|
'; if (e + 2 == nameList[j].field.length) { tableString += rows[i][nameList[j].field.substring(0, e)]; } else tableString += rows[i][nameList[j].field]; tableString += ' | '; } tableString += '\n
编号 | 姓名 | 详细信息 | 登录信息 | |||
---|---|---|---|---|---|---|
地址 | 电话 | 邮箱 | 登录名 | 密码 |