I have an image which when click, I want to link to a mailto:
<a id="mailto" href="mailto:[email protected]" target="_newtab" >
<img src="@Url.Content("~/Content/HomePage/email.png")" alt="email" /></a>
However, currently once its clicked, it will launch the email option to choose a mailto application, and once i choose, the mailto link is open in the current tab. This will cause user to leave the application.
So, I want the page to sent email (by gmail, yahoo, etc ) is either open in new tab or in a window. Any idea how to do this? I tried both target="_newtab" and target="_blank" but both didn't work.
Any help will be much appreciated.. Thanks...
(jQuery method is also acceptable if there is no other way, thanks)
target="_blank" rel="noopener noreferrer"
in modern browsers. See this CSS Tricks article for more details. – Phototransistor