Home >Web Front-end >JS Tutorial >Pure javascript to automatically send emails_javascript skills
Description:
This JavaScript will help you email people. Just click email and there's someone! And the JavaScript will ask you for the email address, subject, etc. and then a new email will be opened to you.
<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>
Okay, the above is the code to automatically send emails using javascript. The code is simple and easy to understand. I hope it will be helpful to everyone. For more information, please continue to pay attention to the Script House website. The site has new updates every day. The content has been updated, thank you!