通过javascript发送网页 [英] Send a web page through javascript

查看:114
本文介绍了通过javascript发送网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过javascript向网页发送电子邮件。它足以打开Outlook新邮件选项。我试图移动这里我在html中使用mailto:选项。
其实我试图创建一个动态的电子邮件模板,并希望以html格式发送该模板。



它的显示错误评论行参数无效,验证您正在使用的开关
请给我解决方案。

解决方案

Javascript不能发送电子邮件。您最好的选择是< a href =mailto:foo@bar.com>电子邮件我< / a> 语法。有一个约定,大多数浏览器支持,您可以设置各种属性的内容。

 < a href = mailto:foo@bar.com?subject = Hi& body = hello%2C + there%21>电子邮件我< / a> 

它必须是URL编码,据我所知,没有可靠的方法通过HTML。您必须承担纯文本电子邮件。


I want to email a web page through javascript. Its enough to open the outlook new mail option. I try to move a Here i am using mailto: option in html. Actually i am try to create a dynamic email template and want to send that template in html format.

Its showing error "comment line argument is not valid. verify the switch you are using" please get me the solution.

解决方案

Javascript can't send e-mails. Your best bet is the <a href="mailto:foo@bar.com">e-mail me</a> syntax. There is a convention that most browsers suppors that lets you set the contents of various attributes as well.

<a href="mailto:foo@bar.com?subject=Hi&body=hello%2C+there%21">e-mail me</a>

It will have to be URL encoded, and as far as I know, there is no reliable way to pass HTML. You have to assume plain text emails.

这篇关于通过javascript发送网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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