easyui-window关闭事件

使用easyui-window初始化一个窗口,由于窗口上方的按钮都是自动组装生成。故很难找到监听事件源(平常做监听,都必须找到事件源)。但是easyui提供了一系列的监听方法:onClose,onBeforeColse...的方法。

 

如有窗口:<div id="win" class="easyui-window" title="新增互动类型" closed="true" style="300px;height:220px;padding:5px;"></div>

点击关闭的x后触发事件监听:

$(document).ready(function(){         
  $('#win').window({
   onBeforeClose:function(){
     alert(111);
  }
}); });
原文地址:https://www.cnblogs.com/cuijinlong/p/7044960.html