以下使用 jQuery 验证插件的脚本 - http://docs.jquery.com/Plugins/Validation - 阻止发送此处找到的表单:
http://www.bestcastleintown.co.uk/book2.php
请填写表格并观看验证消息消失然后尝试按发送,这似乎没有发送,我不明白为什么。
删除此脚本后,联系表单将正常运行并允许发送。因此,我认为这是造成问题的原因。任何帮助或建议将不胜感激。
<script type="text/javascript">
jQuery.validator.setDefaults({
debug: true,
success: "valid"
});;
</script>
<script>
$(document).ready(function() {
$("#aform").validate({
rules: {
postcode: {required: true,minlength: 6},
phone: {required: true,number: true}
}
});
});
</script>