V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xuyiwei
V2EX  ›  问与答

在一个网页上放入iframe,iframe 内是一个登录页面, 登录成功后 如何跳出框架,直接转到登录成功后的页面。

  •  
  •   xuyiwei · 2013-09-06 17:07:33 +08:00 · 5064 次点击
    这是一个创建于 3883 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 条回复    1970-01-01 08:00:00 +08:00
    ijse
        1
    ijse  
       2013-09-06 17:13:52 +08:00
    `top.location.href='http://xxx.ooo'`

    或者,登陆按钮如果是链接,那么添加 `target="_top"`

    或者,表单提交方式登陆,那么`<form target="_top" ... >`
    lichao
        2
    lichao  
       2013-09-06 17:14:01 +08:00
    Ajax 验证登陆成功后,用 js 跳转
    window.top.location.href = ......
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1062 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 22:16 · PVG 06:16 · LAX 15:16 · JFK 18:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.