用Javascript触发电话 [英] Trigger phone call with Javascript

查看:98
本文介绍了用Javascript触发电话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想仅使用Javascript而不使用锚来触发tel:12345 HREF.我只是想获取一个输入字段的值,然后使用JS提示用户调用键入的数字.我的触发器将是位于该字段旁边的按钮.

I would like to trigger a tel:12345 HREF using only Javascript, not with an anchor. I simply want to grab the value of an input field and use JS to prompt the user to call the number typed in. My trigger will be a button located next to the field.

建议?

推荐答案

使用:

window.open('tel:12345');

这篇关于用Javascript触发电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆