菜鸟学堂
在线运行
源代码
<!DOCTYPE> <html> <head> <title>jQuery Validate 插件 - AJAX CAPTCHA(验证码)</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="keywords" content="AJAX,JHR,PHP,CAPTCHA(验证码),下载,PHP CAPTCHA(验证码),AJAX CAPTCHA(验证码),AJAX PHP CAPTCHA(验证码),下载 AJAX CAPTCHA(验证码),下载 AJAX PHP CAPTCHA(验证码)" /> <meta name="description" content="一个 AJAX CAPTCHA(验证码)脚本,使用 PHP 编写的" /> <script src="http://edu.jb51.net/assets/jquery-validation-1.14.0/lib/jquery.js"></script> <script src="http://edu.jb51.net/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script> <script src="http://edu.jb51.net/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script> <script type="text/javascript" src="http://edu.jb51.net/assets/jquery-validation-1.14.0/demo/captcha/captcha.js"></script> <link rel="stylesheet" type="text/css" href="/assets/jquery-validation-1.14.0/demo/captcha/style.css" /> <style type="text/css"> img { border: 1px solid #eee; } p#statusgreen { font-size: 1.2em; background-color: #fff; color: #0a0; } p#statusred { font-size: 1.2em; background-color: #fff; color: #a00; } fieldset label { display: block; } fieldset div#captchaimage { float: left; margin-right: 15px; } fieldset input#captcha { width: 25%; border: 1px solid #ddd; padding: 2px; } fieldset input#submit { display: block; margin: 2% 0% 0% 0%; } #captcha.success { border: 1px solid #49c24f; background: #bcffbf; } #captcha.error { border: 1px solid #c24949; background: #ffbcbc; } </style> </head> <body> <h1><acronym title="异步 JavaScript 和 XML">AJAX</acronym> <acronym title="用于区分计算机和人类的完全自动化的公共图灵测试">CAPTCHA(验证码)</acronym>,基于 <a href="http://psyrens.com/captcha/">http://psyrens.com/captcha/</a></h1> <form id="captchaform" action=""> <fieldset> <div id="captchaimage"><a href="static/jquery-validation/demo/captcha/index.php" id="refreshimg" title="点击刷新图像"><img src="static/jquery-validation/demo/captcha/images/image.php?1395847946" width="132" height="46" alt="验证码图像" /></a></div> <label for="captcha">请输入上面图片的字符(不区分大小写):</label> <input type="text" maxlength="6" name="captcha" id="captcha" /> <input type="submit" name="submit" id="submit" value="检查" /> </fieldset> </form> <p>如果您不能辨认图像上的文本,请点击图像动态生成一个新的验证码。</p> </body> </html>
运行结果
在线运行
菜鸟学堂 edu.jb51.net