Can we do mail using javascript ,Is it possible ? if this is your question than "Yes" you can do this easily, just you need to little bit knowledge of javascript basics programming .Here is simple line of code that will help you to do mail. If you have already basic knowledge of javascript than its great and will help you understand javascript lines of code.Just copy and paste these line of code on notepad and save as mail.html and try to understand that what is code doing. Click here to Download Demo .
Code :
- <!--Author: Mohammad Usman
- Date : 02/01/2010 -->
- <html>
- <script language="javascript">
- function sendMail() {
- var link = "mailto:example@domain.com"+"?cc=example@domain.com"+"&subject= " + "This is my subject"+"&body= "+document.getElementById('myText').value;
- var wndMail = window.open(link, "_blank", "scrollbars=yes,resizable=yes,width=10,height=10");
- if(wndMail)
- {
- wndMail.close();
- }
- }
- </script>
- </head>
- <body>
- <textarea id="myText">
- This the Body of mail...
- </textarea>
- </html>
No comments:
Post a Comment