function openWindow(url, _ctrlId, _title, _width, _height, _iconCls) {
var url = path + url;
var fContent = frameContent(url);
$(_ctrlId).html(fContent);
var win = $(_ctrlId).window({
title: _title,
width: _width,
height: _height,
iconCls: _iconCls,
top: 5,
modal: true,
closed: true
});
win.window("open");
}
openWindow("/User/UserAdd", "#user_add", "增加用户", 1000, 400, 'icon-add');//弹出窗口的方式
_ctrlId 是主页面的div 希望在弹出页面点击关闭按键,关闭窗口!如何实现,请不吝赐教!
2 个解决方案
#1
你这是用了什么框架了吧
如果是easyui的话,$('#user_add').window('close');
如果是easyui的话,$('#user_add').window('close');
#2
window.win = $(_ctrlId).window({
title: _title,
width: _width,
height: _height,
iconCls: _iconCls,
top: 5,
modal: true,
closed: true
});
改全局变量
win.window("close");没猜错应该是这个方法关闭
title: _title,
width: _width,
height: _height,
iconCls: _iconCls,
top: 5,
modal: true,
closed: true
});
改全局变量
win.window("close");没猜错应该是这个方法关闭
#1
你这是用了什么框架了吧
如果是easyui的话,$('#user_add').window('close');
如果是easyui的话,$('#user_add').window('close');
#2
window.win = $(_ctrlId).window({
title: _title,
width: _width,
height: _height,
iconCls: _iconCls,
top: 5,
modal: true,
closed: true
});
改全局变量
win.window("close");没猜错应该是这个方法关闭
title: _title,
width: _width,
height: _height,
iconCls: _iconCls,
top: 5,
modal: true,
closed: true
});
改全局变量
win.window("close");没猜错应该是这个方法关闭