A. extjs 定義window的時候有一個右上角有一個關閉按鈕,點擊時是隱藏操作,如何讓它做關閉操作
以下是關閉操作的代碼:
//新增會計期間
function openAddDialog(){
//使彈出窗體顯示在最前面
Ext.useShims=true;
var win=new Ext.Window(
{title:"新增",
width:320,
height:250,
html:addDialogStr,
modal:true,
buttons:[{
text:"確認",handler:function(){
alert("確認");
//關閉打開的窗體
win.close();
}, {
text:"取消",handler:function(){
win.close();
}
}]
});
win.show();
}
//點擊右上角的關閉按鈕後
win.on("close",function(){
alert("關閉窗體");
});
}