通过javascript发送网页

编程入门 行业动态 更新时间:2024-10-24 16:29:00
本文介绍了通过javascript发送网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我想通过javascript向网页发送电子邮件。它足以打开Outlook新邮件选项。我试图移动这里我在html中使用mailto:选项。 其实我试图创建一个动态的电子邮件模板,并希望以html格式发送该模板。

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

解决方案

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

< a href = mailto:foo@bar?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">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?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发送网页

本文发布于:2023-10-26 12:03:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1530083.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网页   javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!