程序員論壇

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 1491|回復: 0
打印 上一主題 下一主題

HTML 單擊手機網頁上的鏈接時如何觸發電話

[複製鏈接]

7536

主題

0

好友

2萬

積分

版主

Rank: 7Rank: 7Rank: 7

跳轉到指定樓層
樓主
發表於 2020-7-6 18:26:59 |只看該作者 |倒序瀏覽
單擊手機網頁上的鏈接時如何觸發電話
How to trigger a phone call when clicking a link in a web page on mobile phone

大多數現代設備都支持tel:方案。 因此,使用
  1. <a href="tel:555-555-5555"> 555-555-5555 </a>
複製代碼
,您應該一切順利。

如果您想將其用於圖像,則<a>標記可以處理放置在其中的<img />,就像使用其他正常情況一樣:
  1. <a href="tel:555-555-5555"> <img src = “ path / to / phone / icon.jpg” /> </a>
複製代碼
Most modern devices support the tel: scheme. So use <a href="tel:555-555-5555">555-555-5555</a> and you should be good to go.
If you want to use it for an image, the <a> tag can handle the <img/> placed in it just like other normal situations with : <a href="tel:555-555-5555"><img src="path/to/phone/icon.jpg" /></a>


回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

程序員論壇

GMT+8, 2024-9-20 06:17 , Processed in 0.033123 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回頂部
HK Piece免費建立你的網上商店
Pocket Money Easy