adspace


How can we send mail using JavaScript?

Answer Posted / ramesh

At jsscript tag

function sendmail(_frm)
{
var eml="you@youraddress.com";
var bod="&body="+_frm.selOne.value+" ¦¦ "+_frm.txtOne.value;
var subj="?subject=Whatever you want";
location.href="mailto:"+eml+subj+bod;
}

At Form tag
<form action="mailto:you@youraddress.com"
enctype="text/plain"
method="POST" onsubmit="sendmail(this);return false;">

Is This Answer Correct ?    28 Yes 30 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to detect a mobile device using php

1177


Which variable declarations within a class is invalid in php?

1052


Write a program using while loop?

1128


How to create a web form?

1116


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

2181


Tell me what kind of things have you done on the social side?

1071


What sized websites have you worked on in the past?

1092


What is the current stable version of php?

1130


What does $_files means?

1170


What is the current stable version of php? What advance thing in php7?

1100


What is difference between static and final in php?

1114


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1082


List some features of php that are deprecated in php7?

1026


What is trait in php?

1072


sort term descripttion form, report and uery

2257