我如何使用JavaScript将文件附加到电子邮件? [英] How can I use JavaScript to attach a file to a email?

查看:132
本文介绍了我如何使用JavaScript将文件附加到电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的班级制作一张表格,用于记录他们每天所做的事情。

在本周结束时,人们需要将文件通过电子邮件发送给老师。



有没有一种方法可以使用JavaScript自动将当前文件附加到电子邮件?

谢谢。 / p>

编辑:噢,这也得和IE7以及Outlook 2007一起工作。

解决方案

有没有一种方法可以使用JavaScript自动将当前文件附加到电子邮件?



$ b $没有,没有。 JavaScript完全在浏览器中运行,并且无法访问本地文件。可以使用 mailto:链接启动默认电子邮件客户端,并且可以预先设置主题和邮件正文。但除此之外没有什么。


I am making a sheet for my class to use to record what they did each day.

At the end of the week, the people will need to email the file to their teacher.

Is there a way to use JavaScript to automatically attach the current file to a email?

Thanks.

EDIT: Oh, and this has to work with IE7 and Outlook 2007, as well.

解决方案

Is there a way to use JavaScript to automatically attach the current file to a email?

Nope, there isn't. JavaScript runs entirely in the browser, and has no access to local files. It is possible to start up the default E-Mail client using a mailto: link, and it is possible to pre-set a subject and message body. But nothing beyond that.

这篇关于我如何使用JavaScript将文件附加到电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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