账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    移动端 window.location.href 跳转app无效的问题
    59
    0

    url地址是 market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen
    我在网页上 用a连接href="market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen"可以跳转,
    但是用 window.location.href= "market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen" 则无效,
    求大神解答,

    附上源码

    <!DOCTYPE html>
    <html lang="en">
    <head>

    <meta charset="UTF-8">
    <title>Document</title>

    </head>

    <body>

    <input type="text">
    <a href="market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen">测试一下</a>

    </body>
    <script type="text/javascript">

    setTimeout(function(){
        window.location.href = "http://www.baidu.com";//可以跳转
        window.location.href = "market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen";//不会跳转
    },2000)

    </script>
    </html>

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    更多回答
    网站公告
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部