本文主要是介绍js调用outlook,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
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>
这篇关于js调用outlook的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!