onclick send to email javascript
function sendMail() {
var link = "mailto:[email protected]"
+ "[email protected]"
+ "&subject=" + encodeURIComponent("This is my subject")
+ "&body=" + encodeURIComponent(document.getElementById('myText').value)
;
window.location.href = link;
}
<textarea id="myText">
Lorem ipsum...
</textarea>
<button onclick="sendMail(); return false">Send</button>
Also in JavaScript:
- Schema Password Hashing COde
- assigned property delete in jquery
- jquery get element id
- reverse an array javascript
- jquery find div with data attribute value
- javascript replace
- express router middleware
- js import and export
- decimal to base 32 javascript
- js map function
- how to push object in array using for loop javascript
- jasmine spy return value when using create Spy Object angular 2
- checking a condition in object javascript
- how to convert string to int js
- javascript check if string contains character
- select the items from selectors in .map reactjs
- Queue Events don't trigger with BullMQ using Heroku Redis
- twig for
- let scores = [80, 90, 70]; for (const score of scores) { console.log(score); }
- angularjs class directive prepend
- how to check if object is empty javascript
- add webpack to react project tutorial
- get contents between tags javascript
- node node_modules/protractor/bin/webdriver-manager update