Trigger phone call with Javascript

拈花ヽ惹草 提交于 2019-12-11 14:14:29

问题


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.

Suggestions?


回答1:


Use:

window.open('tel:12345');


来源:https://stackoverflow.com/questions/16781772/trigger-phone-call-with-javascript

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!