validator实现表单字段自定义验证效果代码
代码语言:html
所属分类:验证
代码描述:validator实现表单字段自定义验证效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <title>validator.js</title> </head> <body> <h1> validator.js </h1> <form id="form"> <div> <label for="email">EMail:</label> <input type="email" name="email" placeholder="" /> </div> <div> <label for="password">Password:</label> <input type="password" name="password" /> </div> <div> <label for="repassword">Confirm Password:</label> <input type="repassword" name="repassword" /> </div> <div> <button type="submit">Submit</button> <button type="reset">Reset</button> </div> <div> <pre id="info"></pre> <pre id="error"></pre> </div> </form> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/validator.min.js"></script> <script type="text/javascript"> var validator = new Validator({ .........完整代码请登录后点击上方下载按钮下载查看
网友评论0