Mailto link in chrome opens new tab

六眼飞鱼酱① 提交于 2019-12-23 09:00:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!