我在网站上找到联系表单时遇到问题!
这是HTML
<form id="contact-form">
<div class="success"> Contact form submitted! <strong>We will be in touch soon.</strong></div>
<fieldset>
<label class="name">
<input type="text" value="Enter Your Name:">
<span class="error">*This is not a valid name.</span>
<span class="empty">*This field is required.</span>
<span class="clear"></span>
</label>
<label class="email">
<input type="text" value="Enter Your E-mail:">
<span class="error">*This is not a valid email address.</span>
<span class="empty">*This field is required.</span>
<span class="clear"></span>
</label>
<label class="phone">
<input type="text" value="Enter Your Phone:">
<span class="error">*This is not a valid phone number.</span>
<span class="empty">*This field is required.</span>
<span class="clear"></span>
</label>
<label class="message">
<textarea>Enter Your Message:</textarea>
<span class="error">*The message is too short.</span>
<span class="empty">*This field is required.</span>
<span class="clear"></span>
</label>
<div class="buttons"><strong><a class="button" data-type="reset">Reset<span></span></a></strong><strong><a class="button" data-type="submit">Submit<span></span></a></strong></div>
</fieldset>
</form>
这是Javascript up top!
$(function(){
$('#contact-form').forms({ownerEmail:'brandon@kizukatech.com'})
});
答案 0 :(得分:1)
要使联系表单生效,必须在某处发送<form>
和</form>
之间输入的数据。这是通过action=
表单参数完成的,例如:
<form id="contactform" action="fireaway.php">
//All your form fields go here
</form>
然后,您的网络服务器上必须有一个fireaway.php
文件才能实际进行处理。它接收联系表单发布的所有变量的值,构造电子邮件,并发送电子邮件。
也许this site有你需要的东西。
答案 1 :(得分:0)
您的表单不包含操作,因此提交表单不会执行任何操作。试试这个:
<form id="contact-form" action="YOUR_SERVER_SIDE_PAGE" method="post">