Webypix
Fonctionnalités Tarifs Agences IA Builder Docs

Créez votre site gratuitement

Aucune carte bancaire requise 14 jours gratuits

Continuer avec Google
Ou continuer avec
function togglePwd(id, iconId) { const input = document.getElementById(id); const icon = document.getElementById(iconId); if (input.type === 'password') { input.type = 'text'; icon.className = 'fa-regular fa-eye-slash'; } else { input.type = 'password'; icon.className = 'fa-regular fa-eye'; } } function checkStrength(val) { const fill = document.getElementById('strength-fill'); const text = document.getElementById('strength-text'); let score = 0; if (val.length >= 8) score++; if (/[A-Z]/.test(val)) score++; if (/[0-9]/.test(val)) score++; if (/[^A-Za-z0-9]/.test(val)) score++; const levels = [ {w:'0%', c:'var(--danger)', t:''}, {w:'25%', c:'var(--danger)', t:'Très faible'}, {w:'50%', c:'#f59e0b', t:'Faible'}, {w:'75%', c:'#3b82f6', t:'Bon'}, {w:'100%',c:'var(--success)', t:'Excellent'}, ]; fill.style.width = levels[score].w; fill.style.background = levels[score].c; text.textContent = levels[score].t; }