Rumah > Artikel > hujung hadapan web > 纯javascript实现自动发送邮件
描述:
此JavaScript将帮助你的电子邮件的人。只要按一下电子邮件,有人!和JavaScript会要求的电子邮件地址,主题,等等然后你,新的邮件,是向你打开了。
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin function mailsome1(){ who=prompt("Enter recipient's email address: ","antispammer@earthling.net"); what=prompt("Enter the subject: ","none"); if (confirm("Are you sure you want to mail "+who+" with the subject of "+what+"?")==true){ parent.location.href='mailto:'+who+'?subject='+what+''; } } // End --> </SCRIPT> <a href='javascript:mailsome1()'>E-Mail Someone!</a> <FORM> <input type=button value="E-Mail Someone!" onClick="mailsome1()"> </FORM>
好了,以上所述就是使用javascript实现自动发送邮件的代码,代码简单易懂
更多纯javascript实现自动发送邮件相关文章请关注PHP中文网!