前端项目设置点击手机号码唤起拨号功能
1.index.html中添加如下代码:<meta name="format-detection" content="telephone=yes" />2.在需要调起手机拨号功能的页面,写如下函数:// 调用拨号功能callPhone (phoneNumber) {window.location.href = 'tel://' + phoneNumber}...
·
1.index.html中添加如下代码:
<meta name="format-detection" content="telephone=yes" />
2.在需要调起手机拨号功能的页面,写如下函数:
// 调用拨号功能
callPhone (phoneNumber) {
window.location.href = 'tel://' + phoneNumber
}
更多推荐
所有评论(0)