编程语言
首页 > 编程语言> > javascript – 打开一个主题和正文预填的电子邮件程序无法正常工作

javascript – 打开一个主题和正文预填的电子邮件程序无法正常工作

作者:互联网

我有以下javascript函数,它应该打开(在我们的例子中是Lotus notes),带有预先填写的电子邮件.

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

但相反,我得到了这个:

解决方法:

更换身体和主题应该可以帮助你:

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

标签:javascript,lotus-notes
来源: https://codeday.me/bug/20190624/1283243.html