我有以下 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;
}
但相反,我得到了这个:
最佳答案
替换 body 和 subject 应该可以帮助您:
function emailpage() {
strTitle = document.title;
strTitle = strTitle.replace("&","-");
window.location = "mailto:?body=" + strTitle + " - " + window.location + "&subject=I thought this link might interest you.";
}
关于javascript - 打开带有主题和正文预填充的电子邮件程序无法正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17804554/