js调用outlook

window.open("mailto:[email protected]?subject=" + value1 + "&body="+ value2);
 



value1为主题,value2为内容

以下代码:(转)
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>网页Javascript提交OutLook发送邮件</title> 
</head> 
<script language="javascript"> 
function toOutLook(){ 
  var objFrm = document.frmEmail; 
    var objFrmOutLook = document.frmEmailOutLook; 
    var msg = ""; 
    msg += "姓名: " + objFrm.name.value + "  "; 
    msg += "电话: " + objFrm.phone.value + "  "; 
    msg += "网址: " + objFrm.website.value + "  "; 
    msg += "主题: " + objFrm.subject.value + "  "; 
    msg += "内容: " + objFrm.message.value + "  "; 
    objFrmOutLook.message.value = msg; 
    objFrmOutLook.action = "mailto:[email protected]?subject=" + objFrm.subject.value; 
    objFrmOutLook.submit(); 
} 
</script> 
<body> 
<form name="frmEmailOutLook" action="" method="post" enctype="text/plain"> 
  <input type="hidden" name="message" value=""> 
</form> 
<form name="frmEmail" action="" method="post"> 
姓名:<input type="text" name="name" value="a"><BR> 
电话:<input type="text" name="phone" value="b"><BR> 
网址:<input type="text" name="website" value="c"><BR> 
主题:<input type="text" name="subject" value="d"><BR> 
内容:<textarea name="message" >ee 
ddd</textarea><BR> 
<input type="button" name="send" value="send" onClick="toOutLook()"> 
</form> 
</body> 
</html>

你可能感兴趣的:(out)