问题
Hi I have a mailto link on my page, which works fine in other broswers. In chrome, it opens a new tab with the mailto link as the URL. Is there any way to suppress the behavior from the web developer's end?
From what I've read, it seems like this is a function of chrome's settings, but I wanted to know if anyone had a work around.
EDIT: site is located here nickstestserver.com/phi-rhos-near-you It is a drupal 7 site. Here is the relevant html.
<td class="table-logo" >
<a href="mailto:alphapresident@phisigmarho.org" target="_blank"><img src="/sites/default/files/email_logo.png"></img></a>
</td>
回答1:
So, removing the "target =_blank" from the URL stopped the behavior.
回答2:
This happens in because you have not set your default mail in that browser and so the browser is treating your link like a page Copy and paste into a new browser window for directions on how to set the default mail.
Below are the URLs for 4 most common web browsers
Internet Explorer https://support.microsoft.com/en-us/help/555566
Firefox https://support.mozilla.org/en-US/kb/change-program-used-open-email-links
Google Chrome https://support.google.com/chrome/forum/AAAAP1KN0B0oxPLcXhbt9w?hl=en
Safari https://support.apple.com/en-us/HT201607
来源:https://stackoverflow.com/questions/34413697/mailto-link-in-chrome-opens-new-tab