简体   繁体   中英

mailto - link not launching on iOS Web App

I am designing a Web App in dreamweaver so using html code etc. I have got the telephone link now to work using a But I am struggling on my iPhone App to get the mailto link to work for email link

When I press the link nothing happens ( all works find on web browser) and on my iPhone App, the Mail does not load up.

I have look everywhere and can find the solution.

<a href='#' onclick='window.open(`mailto:test@test.co.uk`, `_self`);'>Link text</a>

I found this code on stack overflow but its over 8years old and does not work?

Hope you can help?

Tim

This should do it:

<p><a href="mailto:someone@example.com">Send email</a></p>

It makes use of href.

If it is to "hide" the email, then change to

<a href='#' onclick='this.href=`mailto:test@test.co.uk`'>Link text</a>

otherwise

<a href='mailto:test@test.co.uk'>Link text</a>

I have found a simple solution to the issue and that is to add target="_blank" and this then open Mail on a iPhone APP and all is fine. For some reason this is not stated on any other fourm not sure why;-( a bit simple really

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM