为何只有建设银行网站打不开,北京网站建设公司黄页,权威发布图片红字,广东网站建设方案AJAX 的 jQuery Ajax显示对号和错号用于验证输入验证码是否正确废话不多说了#xff0c;直接给大家贴代码了#xff0c;具体代码如下所示#xff1a;$(document).ready(function(e) {$(#yes).hide();$(#no).hide();$(input[namegcode]).keyup(function(){if($(this).val().l…AJAX 的 jQuery Ajax显示对号和错号用于验证输入验证码是否正确废话不多说了直接给大家贴代码了具体代码如下所示$(document).ready(function(e) {$(#yes).hide();$(#no).hide();$(input[namegcode]).keyup(function(){if($(this).val().length4){$.post(gbook.php,{cc:$(input[namegcode]).val()},function(msg){if(msgyes){$(#no).hide();$(#yes).show();}else{$(#yes).hide();$(#no).show();}});}});});首先引入jquery.sl-error-verifycode {background-image: url(images/icons.png);background-position: -26px 0;background-repeat: no-repeat;display: block;font-size: 18px;height: 23px;line-height: 20px;margin-left: 180px;margin-top: -25px;position: relative;text-align: center;width: 20px;z-index: 2;}.sl-correct-verifycode {background-image: url(images/icons.png);background-position: -50px 0;background-repeat: no-repeat;display: block;font-size: 18px;height: 23px;line-height: 20px;margin-left: 180px;margin-top: -25px;position: relative;text-align: center;width: 20px;z-index: 2;}验证码的html 代码验证码* gbook.phpsession_start();if(isset($_POST[cc])){$cc strtolower($_POST[cc]);$ss strtolower($_SESSION[code]);if($cc$ss){echo yes;}else{echo no;}}注意图片一定要引入以上所述是小编给大家介绍的jQuery Ajax显示对号和错号用于验证输入验证码是否正确希望对大家有所帮助如果大家有任何疑问请给我留言小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持您可能感兴趣的文章: