Button Click Send Email Javascript Code Example


Example 1: onclick send to email javascript

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; }

Example 2: onclick send to email javascript

<textarea id="myText">     Lorem ipsum... </textarea> <button onclick="sendMail(); return false">Send</button>

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?