jQuery表单验证

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jQuery表单验证相关的知识,希望对你有一定的参考价值。

this requires jquery.js, jquery.metadata.js, and jquery.validate,js
  1. //contact-form validation
  2. $("form#contact-form").validate({
  3. errorPlacement: function(error, element) {
  4. //appends error message to the p tag of the form field
  5. error.appendTo( element.parent("p") );
  6. }
  7. });

以上是关于jQuery表单验证的主要内容,如果未能解决你的问题,请参考以下文章