具体code如下所示
<%@ page language="java" import=".*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>触发关闭窗口时事件</title>
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.6/themes/default/">
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.3.6/themes/">
<script type="text/javascript" src="jquery-easyui-1.3.6/"></script>
<script type="text/javascript" src="jquery-easyui-1.3.6/"></script>
<script type="text/javascript" src="jquery-easyui-1.3.6/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
$('#dlg').dialog({
onClose:function(){
alert("关闭窗口");
}
});
});
</script>
</head>
<body style="padding-top:350px">
<div class="easyui-dialog" title="Dialog" style="width:400px;height:200px;padding:10px">
The dialog content.
</div>
</body>
</html>