【问题标题】:How to detection iframe URL jump to another URL如何检测 iframe URL 跳转到另一个 URL
【发布时间】:2019-05-09 02:16:14
【问题描述】:

我有一个页面 login.php 使用 iframe "src=http://def.com/login"。

我的域名是example.com。注销后这个def.com跳转到http://def.com/home

当用户注销时,我希望我的页面捕获 iframe URL 从http://def.com/home 跳转到我的页面http://example.com/login.php

【问题讨论】:

  • 您可以检查:登录时是否创建了def.com url的cookie变量,注销时是否删除了该cookie变量?然后你可以使用那个 cookie 变量

标签: javascript php iframe


【解决方案1】:

可以尝试使用$_SERVER['HTTP_REFERER']获取刷新页面url,如果值为undefined或null,则直接访问。

【讨论】:

    猜你喜欢
    • 2012-12-05
    • 2012-07-22
    • 1970-01-01
    • 1970-01-01
    • 2015-12-31
    • 1970-01-01
    • 2014-01-04
    • 1970-01-01
    • 2013-11-08
    相关资源
    最近更新 更多