背景

前端拨号的方法

徐徐
前端
发表于 2024-08-20 16:35:37
🌺 摘要
前端拨号的方法

移动端唤起拨号等功能

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:37
作者:徐徐
转载请注明出处
上一篇:XSS和CSRF攻击
下一篇:js闭包