Extjs:如何根据window的id来关闭窗口?
varjunmWin=newExt.Window({id:'windodo',title:'操作成功',width:200,defaults:{bodyStyle:'fo...
var junmWin=new Ext.Window(
{
id:'windodo',
title : '操作成功',
width:200,
defaults: {
bodyStyle:'font-size:12px;background-color:#C9D9EB;border:0px;margin:0px;padding:0px;'
},
items:[{html:'<p style="border:0px;margin:0px;padding:0px;">所选商品已成功添加到服务订单。</p>'}],
buttonAlign:'center',
buttons :[{text:"确定",handler:function(){<br> junmWin.close();<br> }}]
}
);
junmWin.show();
//Ext.get('windodo').dom.close(); 展开
{
id:'windodo',
title : '操作成功',
width:200,
defaults: {
bodyStyle:'font-size:12px;background-color:#C9D9EB;border:0px;margin:0px;padding:0px;'
},
items:[{html:'<p style="border:0px;margin:0px;padding:0px;">所选商品已成功添加到服务订单。</p>'}],
buttonAlign:'center',
buttons :[{text:"确定",handler:function(){<br> junmWin.close();<br> }}]
}
);
junmWin.show();
//Ext.get('windodo').dom.close(); 展开
2个回答
展开全部
代码:
<script type="text/javascript">
function openWindow(id,title,url,width,height){
var win = Ext.get(id)
if (win) {
win.close();
return;
}
win = new Ext.Window({
id:id,
title:title,
layout:'fit',
width:width,
height:height,
closeAction:'close',
collapsible:true,
plain: false,
resizable: true,
html : '
<script type="text/javascript">
function openWindow(id,title,url,width,height){
var win = Ext.get(id)
if (win) {
win.close();
return;
}
win = new Ext.Window({
id:id,
title:title,
layout:'fit',
width:width,
height:height,
closeAction:'close',
collapsible:true,
plain: false,
resizable: true,
html : '
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-05-25
展开全部
Ext.getCmp("'windodo'").close();
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询