xuyiwei
V2EX  ›  问与答

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

  •  
  •   xuyiwei · Sep 6, 2013 · 6121 views
    This topic created in 4810 days ago, the information mentioned may be changed or developed.
    2 replies  •  1970-01-01 08:00:00 +08:00
    ijse
    ijse
    Sep 6, 2013
    1
    `top.location.href='http://xxx.ooo'`

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

    或者,表单提交方式登陆,那么`<form target="_top" ... >`
    lichao
    lichao
    Sep 6, 2013
    2
    Ajax 验证登陆成功后,用 js 跳转
    window.top.location.href = ......
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1573 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:53 · PVG 16:53 · LAX 00:53 · JFK 03:53
    ♥ Do have faith in what you're doing.