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

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable