HTML - 如何在测验<form> </form>上获得答案

时间:2015-02-26 18:35:41

标签: html coldfusion

<form action="quiz.cfm" method="get">
<fieldset>
<legend>Your Details</legend>

<div>
<label for="What is the length of a banana?">What is the length of a banana?:</label><br>
<input type="text" name="What is the length of a banana?" value="" maxlength="100" /><br>
</div>

<div>
<input type="submit" value="Submit" />
</div>

</fieldset>
</form>

您好。 这是我到目前为止的代码。 我想知道我应该做些什么才能真正得到答案,例如将它们发送到我的电子邮箱。

提前谢谢你, Iluvpresident

1 个答案:

答案 0 :(得分:2)

以下代码应纳入“quiz.cfm”页面。

<cfmail 
    from="fromemailaddress" 
    to="toEmailAddress" 
    subject="A new form entry has been submitted"> 

A customer inquiry was posted to our website: 

Text : #Form.answer# 

</cfmail>