标签:开始 tail 20px tle ret 发放 plain opera tag
$("#totalTb").datagrid({
columns: [[
{ field: ‘ENTITY_ACTNAME‘, title: ‘活动名称‘, width: 120, align: "left", halign: ‘center‘ },
{ field: ‘ACT_RATE‘, title: ‘答题中奖率‘, width: 80, align: "right", halign: ‘center‘ },
{ field: ‘ENTITY_START‘, title: ‘开始时间‘, width: 100, align: "center", halign: ‘center‘ },
{ field: ‘ENTITY_END‘, title: ‘结束时间‘, width: 100, align: "center", halign: ‘center‘ },
{ field: ‘ENTITY_NAME‘, title: ‘实物名称‘, width: 100, align: "left", halign: ‘center‘ },
{ field: ‘ENTITY_RATE‘, title: ‘实物中奖率‘, width: 100, align: "right", halign: ‘center‘ },
{ field: ‘ENTITY_NUM‘, title: ‘总数量‘, width: 80, align: "right", halign: ‘center‘ },
{ field: ‘ENTITY_SEND_NUM‘, title: ‘已发放数量‘, width: 100, align: "right", halign: ‘center‘ },
{ field: ‘ENTITY_LAST_NUM‘, title: ‘剩余数量‘, width: 100, align: "right", halign: ‘center‘ },
{
field: ‘OPERATE‘, title: ‘操作‘, width: 100, align: "center", formatter: btnDetailed
}
]],
});
// 详细按扭
function btnDetailed(value, rowData, rowIndex) {
if (typeof rowData.ENTITY_NO == "string") {
return ‘<input type="button" value="详细" onclick="clickDetailedEntity( \‘‘ + $.trim(rowData.ENTITY_NO) + ‘\‘);" class="easyui-linkbutton" iconCls="icon-edit" plain="true" style="width:50px;height:20px;" />‘;
}
}
另:用<button>详细</button>来添加按钮时,当点击按钮时,页面会刷新
用<input type="button" value="详细"/> 点击按钮时不会刷新页面
标签:开始 tail 20px tle ret 发放 plain opera tag
原文地址:http://www.cnblogs.com/suxiaBlogs/p/7069440.html