如何通过javascript拨打电话号码而不使用< a>标签? [英] how to call a phone number through javascript without using <a> tag?

查看:124
本文介绍了如何通过javascript拨打电话号码而不使用< a>标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计了一个移动网页。在那里,我有一个电话号码字段,在点击时应该调用该特定号码。我不能使用:

I designed a mobile web page. There I have a phone number field, which on clicking should call that particular number. I can't use:

<a href="tel:+1800229933"></a> 

因为我使用表格标签添加了电话号码字段,如下所示:

Because I have added the phone number field using table tag as follows:

<table><tr><td>Phone: 900 300 400</td></tr></table>

是否还有其他方法(如OnClick事件)在点击该列时调用该电话号码?

Is there any other methods(like OnClick event) to call that phone number on clicking that column?

推荐答案

更改此:

 <table><tr><td>Phone: 900 300 400</td></tr></table>

to:

<table><tr><td><a href="tel:+900300400">Phone: 900 300 400</a></td></tr></table>

这篇关于如何通过javascript拨打电话号码而不使用&lt; a&gt;标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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