【问题标题】:Mobile redirect/forward to tel://移动重定向/转发到 tel://
【发布时间】:2018-02-18 11:40:20
【问题描述】:

我试图了解为什么以下内容适用于桌面但不能通过 android 移动:

<script>
window.location.replace("tel://023222244546");
</script>

我尝试了许多重定向,但没有一个在移动设备上有效。我知道点击href会起作用,但我正在尝试实现这个onload

【问题讨论】:

  • 据我所知,移动浏览器“理解”a 标签与“tel://”的href,并将其转换为原生操作(打开手机应用程序)。

标签: javascript android redirect tel


【解决方案1】:

去掉“//”

<script>
window.location.replace("tel://023222244546");
</script>

https://www.rfc-editor.org/rfc/rfc3966#section-8

【讨论】:

    猜你喜欢
    • 2016-04-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多