PHP入门到精通教程
首页 > PHP入门到精通教程 > HTML 表单发送邮件

HTML 表单发送邮件

2020-09-10 11:03:25 28

编辑 收藏

代码:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>表单发送邮件</title> 
</head>
<body>

<h3>发送邮件到 someone@example.com:</h3>

<form action="MAILTO:someone@example.com" method="post" enctype="text/plain">
Name:<br>
<input type="text" name="name" value="your name"><br>
E-mail:<br>
<input type="text" name="mail" value="your email"><br>
Comment:<br>
<input type="text" name="comment" value="your comment" size="50"><br><br>
<input type="submit" value="发送">
<input type="reset" value="重置">
</form>

</body>
</html>

结果如图所示:

在这里插入图片描述