🌺
摘要
介绍前端实现一键拨号的常见方式、兼容性处理与实际使用注意点。
移动端唤起拨号等功能
index.html在
中加入这一段<meta name="format-detection" content="telephone=yes"/>
callPhone () { //创建一个方法
window.location.href = 'sms:10086?body=短信内容'; // 添加内容
window.location.href = 'sms:10086'; // 不添加内容
}
<a href="sms:10086">发送短信</a>
<a href="sms:10086?body=短信内容"></a>
<a :href="'mailto:' + numbers">{{ numbers }}</a> //numbers 就是号码 文章发表于 2024/08/20 16:35
评论
加载中...