如何查看窗口是否弹出? [英] How to check window is popup or not?

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

问题描述

我如何检查窗口是否为弹出窗口?

当我在一个普通页面中遇到任何异常时,就会出现一个超链接,它将其重定向到登录页面.现在,如果当我单击该链接登录页面时该弹出窗口内的弹出窗口上出现异常.:(

任何想法.

或任何其他解决方法!!!

How can i check a window is a popup windows or not ?

When I have got any exception in one common page has come and there is a hyperlink that redirect it to login page. Now if the Exception comes on a Popup windows when i click on that link login page comes inside that popup window.:(

Any idea .

or any other solluation !!!

推荐答案

单击超链接时,调用包含以下代码的函数:
opener.top.location ="LoginPageUrl";
window.close();

这会将父窗口重定向到登录"页面并关闭弹出窗口.

如果需要其他内容,请告诉我.

On click of the hyperlink, call a function containing the following code:
opener.top.location = "LoginPageUrl";
window.close();

This will Redirect the parent window to Login page and close the popup window.

Please let me know if you need something else.


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

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