js调用outlook

本文介绍了一种使用JavaScript通过Outlook发送邮件的方法。该方法通过HTML表单收集信息,并利用JavaScript将这些信息构造成邮件的内容和主题,最后通过window.open调用Outlook进行发送。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


window.open("mailto:sundysea@hotmail.com?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:sundysea@hotmail.com?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>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值