
Captcha estático con Js
JavaScript
1.711 visualizaciones desde el 14 de Diciembre del 2021
https://github.com/nob322/captchaConJsEnFormularioDeContacto
Les comparto un captcha estático que escribí en Js, saludos
Les comparto un captcha estático que escribí en Js, saludos
var contieneValorCatcha = 776179;
var catcha = document.getElementById("catcha").value;
function cambiarClase(elIdSellama) {
const cambio = document.getElementById(elIdSellama).className = 'error';
return cambio;
}
if (catcha === "") {
cambiarClase("errorCatcha");
return false;
} else if (catcha != contieneValorCatcha) {
cambiarClase("errorCatchaIngresoErroneo");
return false;
} else if (catcha === contieneValorCatcha) {
cambiarClase("okCatchaOk");
return true;
// setTimeout(esCorrecto,5000);
}
}