<!doctype html> <html> <head> <meta content="text/html" charset="UTF-8"> <title>表单验证插件学习</title> </head> <body> <form class="demoform"> <input type="text" value="" name="name" datatype="s5-16" errormsg="昵称至少5个字符,最多16个字符!" /> </form> <script type="text/javascript" src="http://validform.rjboy.cn/wp-content/themes/validform/js/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="http://validform.rjboy.cn/Validform/v5.1/Validform_v5.1_min.js"></script> <script> $(".demoform").Validform(); </script> </body> </html>
以上是最简单的用法,高级用法可以参考:官方文档