【问题标题】:window.location.href doesn't work in Ipad and Iphonewindow.location.href 在 Ipad 和 Iphone 中不起作用
【发布时间】:2014-10-18 12:42:20
【问题描述】:

我在表单中使用了 Google Login API。登录用户后,我使用window.location.href 将用户重定向到另一个页面,但在iPadiPhone 中不起作用。

window.location.href = "http://example.com/test";

【问题讨论】:

    标签: javascript ios mobile


    【解决方案1】:

    如下图删除href

    window.location = "http://example.com/test";
    

    【讨论】:

    • 在地址栏中设置 URL 但不刷新/加载页面。
    猜你喜欢
    • 1970-01-01
    • 2012-05-09
    • 2012-09-19
    • 1970-01-01
    • 2016-03-05
    • 1970-01-01
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    相关资源
    最近更新 更多