Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
788 views
in Technique[技术] by (71.8m points)

button - 可点击的电话号码作为按钮(Clickable Phone number as button)

I created a button using bootstrap that will launch the phone app once clicked but for some reason this method only works when using it with the link tag it doesn't seem to work with button.

(我使用引导程序创建了一个按钮,单击该按钮后将启动电话应用程序,但由于某种原因,该方法仅在与链接标记一起使用时才有效,但似乎不适用于按钮。)

Could you guys tell me what I'm doing wrong?

(你们能告诉我我在做什么错吗?)

Thanks, Richard.

(谢谢,理查德。)

below is my code:

(下面是我的代码:)

<button type="button" class="btn btn-info" href="tel:513-000-234">(513) 000-234</button>
  ask by Richard Rodgers translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is it:

(就是这个:)

<button type="button" class="btn btn-info" onclick="window.location.href ="tel:513-000- 
 234" ;">(513) 000-234</button>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...