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:"考勤明细", width: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:"考勤明细", width:650, height:450, collapsible:false, minimizable:false, maximizable:false, modal:true , href:url }); };
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/2527.html