Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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

onclick send to email javascript

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

PREVIOUS NEXT
Code Example
Javascript :: convert date to unix timestamp javascript 
Javascript :: random function in javascript 
Javascript :: ajax form submit without form tag 
Javascript :: append to map javascript 
Javascript :: nodejs add new property array object 
Javascript :: How do I redirect to another webpage using javascript 
Javascript :: javascript array contains 
Javascript :: express session 
Javascript :: crypt a string jquery 
Javascript :: angular detect chromebook 
Javascript :: javascript how to get last property of object 
Javascript :: Add an item to the beginning of an Array 
Javascript :: palindrome javascript 
Javascript :: js every 
Javascript :: nodejs return value 
Javascript :: javascript export to pdf 
Javascript :: how to run a function infinite time in javascript 
Javascript :: socket emit to specific room using nodejs socket.io 
Javascript :: less than or equal to javascript 
Javascript :: axios post request javascript 
Javascript :: axios data fetch 
Javascript :: dynamic search bar javascript 
Javascript :: javascript countdown 
Javascript :: anime.js 
Javascript :: reverse a string while keeping spaces in javascript 
Javascript :: for in range javascript 
Javascript :: angular right click action 
Javascript :: javascript null check 
Javascript :: Find duplicate or repeat elements in js array 
Javascript :: javascript loop replace object values using function 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =