如何关闭当前弹出窗口 [英] how to close current popup

查看:78
本文介绍了如何关闭当前弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i am working on mvc application. a record of this project is display when i click on one of them then a popup open(using jquery). in this popup two button namely view and close. when i click on view button then a new popup one(using jquery) and in this popup also have two button namely submit and close. when i click on close button of current popup both popup are being close but i want to close current popup. how can i do this
please help

thanks in advance

推荐答案

在jQuery中,这一点不像你初看到的那么明显。有两种方法,可以调用特定的对话框:



This is a little less obvious in jQuery than you would expect at first glance. There are 2 ways to do it, either invoke the specific dialog:

onclick="


('#myDialog')。dialog('close');
('#myDialog').dialog('close');"





或找到它,假设你点击一个子元素(在标题栏或正文中):





or locate it, assuming that you're clicking a child element ( in the titlebar or body):

onclick="


(this).closest('。ui-dialog')。children('。ui-dialog-content')。dialog('close');
(this).closest('.ui-dialog').children('.ui-dialog-content').dialog('close');"





后者几乎是关闭匿名对话框的唯一方法,除非你想为你的windows连接跟踪系统。



The latter is pretty much the only way to close an anonymous dialog unless you want to wire in a tracking system for your windows.


这篇关于如何关闭当前弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆