使用锚标签打开一个mailto并调用一个URL [英] Using anchor tag to open a mailto and invoke a URL

查看:125
本文介绍了使用锚标签打开一个mailto并调用一个URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有了我的一个要求,我需要打开默认邮件客户端并调用服务调用,这需要使用锚标签或纯粹的html完成,约束是我们不能使用相同的javascript。
有没有人有任何想法如何实现这一目标?

解决方案

试试这个:

 < a href =mailto:test@test.com>点击邮件< / a> 

这将打开默认邮件客户端。

编辑:

您可以使用onClick函数打开新窗口并在其中调用webservice url。 / p>

 < a href =mailto:test@test.comtarget =_ blankonclick =window.open('你的WS URL');>点击邮件< / a> 


With one of my requirements i need to open up the default mailing client with invoking a call to a service, this needs to be accomplished using anchor tags or purely html, the constraint is that we can not use javascript for the same. Does anyone have any idea on how to accomplish this?

解决方案

try this:

<a href="mailto:test@test.com">Click to Mail</a>  

This will open default mailing client.

Edit :
You may use onClick function to open new window and call you webservice url in it.like

<a href="mailto:test@test.com" target="_blank" onclick="window.open('your WS URL');">Click to Mail</a>

这篇关于使用锚标签打开一个mailto并调用一个URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆