xuyiwei
V2EX  ›  问与答

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

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

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

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