EasyUI中datagrid双击事件
在jsp文件底部增加代码:
<script type="text/javascript"> //数据表双击事件 $('#tableworkbydaydata').datagrid({ onDblClickRow: function (rowIndex, rowData) { //获取考勤明细 var url = path + '/checkin/workDetailForm.do?day='+rowData.day+'&random='+Math.random(); detailOpenWindow(url); } }); var detailOpenWindow = function(url){ $("#detailWin").window({ title:"考勤明细", 650, height:450, collapsible:false, minimizable:false, maximizable:false, modal:true , href:url }); }; </script>
或者直接写到js文件:
//数据表双击事件 $('#tableworkbydaydata').datagrid({ onDblClickRow: function (rowIndex, rowData) { //获取考勤明细 var url = path + '/checkin/workDetailForm.do?day='+rowData.day+'&random='+Math.random(); detailOpenWindow(url); } }); var detailOpenWindow = function(url){ $("#detailWin").window({ title:"考勤明细", 650, height:450, collapsible:false, minimizable:false, maximizable:false, modal:true , href:url }); };