How to draw captcha in HTML page through javascript
Hi all,Please help me, How to draw captcha in HTML page through javascript.
If possible, send me the code.
<script type="text/javascript">
//Created captcha
function DrawCaptcha()
{
var x = Math.ceil(Math.random() * 10)+ '';
var y = Math.ceil(Math.random() * 10)+ '';
var z = Math.ceil(Math.random() * 10)+ '';
var code = x + ' ' + y + ' ' + ' ' + z ;
document.getElementById("tCaptcha").value = code
}
// generated security
function ValidCaptcha(){
var string1 = removeSpaces(document.getElementById('tCaptcha').value);
var string2 = removeSpaces(document.getElementById('tInput').value);
if (string1 == string2) return true;
return false;
}
function showRecaptcha(element)
{
Recaptcha.create(
"http://www.google.com/recaptcha/api/js/recaptcha_ajax.js",
element,
{
lang: "<%=LanguageCode %>",
theme: "red"
//callback: Recaptcha.focus_response_field
});
}