can somebody sent me a link, or to provide me an example with pure Javascript/jQuery captcha. Because I can see a lots of examples with PHP/C# ... back end. But I need just Javascript .
Thanks !!
I think this is not a good idea, because if validation is made in client (js), somebody can make a script to read the correct answer.
EDIT
Anyway, if you want a useless captcha, you can play with this:
See in jsfiddle.
HTML
Pseudo-Human check.
<br/>How much is: <input type="text" id="a"/>
<br/>Answer:<input type="text" id="b"/>
<br/>
<input type="button" id="c" value="Go!"/>
JS
$(document).ready(function() {
var n1 = Math.round(Math.random() * 10 + 1);
var n2 = Math.round(Math.random() * 10 + 1);
$("#a").val(n1 + " + " + n2);
$("#c").click(function() {
if (eval($("#a").val()) == $("#b").val()) {
alert("Ok! You are human!");
} else {
alert("error");
}
});
});
EDIT 2:
My "captcha" hack:
// captcha hack
$(document).ready(function() {
$("#b").val(eval($("#a").val()));
});
See in jsfiddle.
That doesn't make sense... without a backend check, the captcha is useless. bots don't use javascript anyway. All you'd be accomplishing is to annoy your users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With