Captcha is the best way to ensure security of an input form in webpage. Instead of using captcha plugin, we can use jQuery to create numbered Calculation. Here is the code to create numbered captcha using jquery.
General concept behind this Calculation is two number will be shown, we have to add and type the sum in textbox.
For every page refresh two numbers will change
Refresh Calculation -> to change numbers
When we enter wrong total, an alert message will be displayed and two numbers will changed.
General concept behind this Calculation is two number will be shown, we have to add and type the sum in textbox.
For every page refresh two numbers will change
Refresh Calculation -> to change numbers
When we enter wrong total, an alert message will be displayed and two numbers will changed.
<!--########## PUT JQUERY LIBRARY INTO HEAD SECTION ###########--> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.min.js"></script> <!--########## PUT JQUERY CODE INTO HEAD SECTION ###########--> <script charset="utf-8" type="text/javascript"> $(document).ready(function(){ var aa = Math.ceil(Math.random() * 10); var ba = Math.ceil(Math.random() * 10); var ca = parseInt(aa) + parseInt(ba); $("#verification_code2").val(''); $("#verification_span").html("Sum of "+ aa + " + " + ba +""); $("#verification_code").val(ca); $("#verification_code2").blur(function(e){ var captcha1 = $("#verification_code").val(); var captcha2 = $("#verification_code2").val(); if(captcha1!=captcha2){ alert ("Please Enter Valid Verification Code"); return false; } }); }); </script> <!--########## PUT HTML CODE INTO YOUR FORM ###########--> <div> Verification Code: (<span id="verification_span"></span>) <input id="verification_code2" name="verification_code2" type="text" value="" /> <input id="verification_code" name="verification_code" type="hidden" value="" /> </div>