Submit Form via E-mail

[Total: 0    Average: 0/5]

This shows how to create a form that submits it’s data to the user specified inside the form by the user.

Body Code:

<script type=text/javascript>
function doIt() {
  var _s = 'value1='+document.ef1.t1.value+'n';
  alert(_s);
  document.ef1.action = "mailto:"+document.ef1.t1.value;
}
</script>
<form name="ef1">
<input name="t1" type="text" value="test@js-examples.com">
<input type="submit" value="now" onclick="doIt()">
</form>

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *