我有一个包含以下字段的表单。由于某些奇怪的原因,电话和邮件未在邮寄请求中发送。
<form id="contact-form" method="post" action="contact.php" name="contactform">
<fieldset>
<div class="float-left">
<label for="Name">Full Name</label>
<input id="name" type="text" name="name" />
<label for="Email">Email Address</label>
<input id="email" type="text" name="email" />
<label for="Phone">Phone Number</label>
<input name="phone" type="text" id="phone" />
</div>
<div class="float-right">
<label for=comments accesskey=C>Message</label>
<textarea id="comments" rows="10" cols="10"
name="comments"></textarea>
<button id="submit" type="submit">Send Enquiry</button>
</div>
<div class="clear"></div>
</fieldset>
</form>
发表:
Parametersapplication/x-www-form-urlencoded
comments
email ukkgfpower@hotmail.com
name Joe Bloggs
phone
Source
name=Joe Bloggs&email=ukkgfpower%40hotmail.com&phone=&comments=
答案 0 :(得分:1)
问题是在处理ajax提交的js文件中没有正确设置字段名称