📜  javascript 在按钮单击时发送电子邮件 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:31.630000             🧑  作者: Mango

代码示例3
function sendMail() {
    var link = "mailto:me@example.com"
             + "?cc=myCCaddress@example.com"
             + "&subject=" + encodeURIComponent("This is my subject")
             + "&body=" + encodeURIComponent(document.getElementById('myText').value)
    ;
    
    window.location.href = link;
}