打开一个电子邮件程序,其中的主题和正文已预先填充,无法正常工作 [英] Open an email program with subject and body prefilled is not working correct

查看:102
本文介绍了打开一个电子邮件程序,其中的主题和正文已预先填充,无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有以下javascript函数,该函数应打开(在我们的情况下为Lotus Notes),并带有预填充的电子邮件.

I have the following javascript function which should open (in our case lotus notes), with a prefilled email.

function emailpage() {
    strTitle = document.title;
    strTitle = strTitle.replace("&","-");
    window.location = "mailto:" + "?subject=I thought this link might interest you." + "&body=" + strTitle + " - " + window.location;
}

但是我得到了这个:

推荐答案

替换正文和主题应该可以帮助您:

Replacing body and subject should help you:

function emailpage() {
    strTitle = document.title;
    strTitle = strTitle.replace("&","-");
    window.location = "mailto:?body=" + strTitle + " - " + window.location + "&subject=I thought this link might interest you.";
}

这篇关于打开一个电子邮件程序,其中的主题和正文已预先填充,无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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