Call function when click on a link
In my iPhone application, i use web view to display formatted text like this :
Tél :
0442059840
The number 0442059840
is a link : <a href="">0442059840</a>
.
开发者_C百科In my case, i want to make a telephone call when i click on that link, is that possible? Thanx in advance.
Just make the href
parameter point to the phone number:
<a href="tel://0442059840">0442059840</a>
You can also let the web view parse for links by setting the data detector types. In that case you just need the phone number, and not the <a></a>
tag.
精彩评论