这样的弹出窗口如何代码关闭?

lxw76 2016-09-19 12:07:47
/弹出式窗口
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 希望在弹出页面点击关闭按键,关闭窗口!如何实现,请不吝赐教!
...全文
552 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
window.win = $(_ctrlId).window({ title: _title, width: _width, height: _height, iconCls: _iconCls, top: 5, modal: true, closed: true }); 改全局变量 win.window("close");没猜错应该是这个方法关闭
  • 打赏
  • 举报
回复
你这是用了什么框架了吧 如果是easyui的话,$('#user_add').window('close');

87,997

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧