开发者

Open default mail client with a link

I have an HTML link on my ASP.NET page. When the user clicks the link, an Outlook window will open. However开发者_开发技巧, it changes the URL on my page also to mailto:reddy@yahoo.com.

How to stop it?

<a href="#" 
   onclick="window.open('mailto:reddy@yahoo.com?Subject=upport','','200','200');"
   style="color: White">Contact Support</a>


Don't do it in a window.open. Just show the link on the page, as a normal link, and Outlook will open in a new window anyway, because it's a different program.


How about this?

<a href="mailto:reddy@yahoo.com?Subject=upport" style="color: White">Contact Support</a>


Using JavaScript, you're navigating to a URL that is a mailto.

Can you switch to a regular anchor tag mailto link?

<a href="mailto:foo@bar.com?Subject=upport">Contact Support</a>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜