I want my website to have the ability to send an email without refreshing the page.(我希望我的网站能够发送电子邮件而不刷新页面。)
So I want to use Javascript.(所以我想使用Javascript。)
<form action="javascript:sendMail();" name="pmForm" id="pmForm" method="post">
Enter Friend's Email:
<input name="pmSubject" id="pmSubject" type="text" maxlength="64" style="width:98%;" />
<input name="pmSubmit" type="submit" value="Invite" />
Here is how I want to call the function, but I'm not sure what to put into the javascript function.(这是我要调用的函数的方式,但是我不确定要在javascript函数中放入什么。) From the research I've done I found an example that uses the mailto method, but my understanding is that doesn't actually send directly from the site.(通过研究,我发现了一个使用mailto方法的示例,但我的理解是实际上并没有直接从站点发送邮件。)
So my question is where can I find what to put inside the JavaScript function to send an email directly from the website.(所以我的问题是,在哪里可以找到要放在JavaScript函数中的内容,以便直接从网站发送电子邮件。)
function sendMail() {
/* ...code here... */
}
ask by user906357 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…