现在的位置: 首页 > 综合 > 正文

beforedestroy 事件

2013年12月03日 ⁄ 综合 ⁄ 共 893字 ⁄ 字号 评论关闭

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="ext-3.1.1/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-3.1.1/adapter/ext/ext-base.js" ></script>
<script type="text/javascript" src="ext-3.1.1/ext-all.js"></script>
<script type="text/javascript">

/*

 

当然,在使用Ext 的事件时,我们一般是直接在控件上事件,每一个控件包含哪些事件,
在什么时候触发,触发时传递的参数等,在ExtJS 项目的文档中都有较为详细的说明。比
如对于所有的组件Component,都包含一个beforedestroy 事件,该事件会在Ext 销毁这一个
组件时触发,如果事件响应函数返回false,则会取消组件的销毁操作。

*/
Ext.onReady(function(){
var win=new Ext.Window({
title:"不能关闭的窗口", height:200, width:300
});
win.on("beforedestroy",function(obj){
alert("想关闭我,这是不可能的!");
obj.show();
return false;
});
win.show();});
</script>
</head>

<body>
</body>
</html>

【上篇】
【下篇】

抱歉!评论已关闭.