<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<input id="idEmail" type="email" /><input id="idAdd" type="button" value="add" onclick="addEmail(); return false;" />
<br />
invite list...
<div id="idList">
</div>
<script type="text/javascript">
function addEmail()
{
if (idEmail.value != null && idEmail.value != '')
{
var checkbox = document.createElement("input");
var description = document.createTextNode(idEmail.value);
checkbox.type = "checkbox";
checkbox.name = "idChk" + idList.children.length;
checkbox.value = idEmail.value;
checkbox.checked = true;
window.open('mailto:' + idEmail.value);
idList.appendChild(checkbox);
idList.appendChild(description);
idList.appendChild(document.createElement("br"));
}
}
</script>
</body>
</html>
You have to know that no email can be send from JavaScript. The provided code will open the default email client for the client...