uncategorized·

Sur le site d’une grande banque…

voilà ce qu'on pourrait trouver, alors qu'on essaye sans succès sur une page Web de changer son mot de passe : ``` <script language="javascript"> function ifEnterIsPressed() { if (window.event.keyCo...

voilà ce qu'on pourrait trouver, alors qu'on essaye sans succès sur une page Web de changer son mot de passe :

text
<script language="javascript">
function ifEnterIsPressed() {
    if (window.event.keyCode==13) {
        submitTheForm();
    }
}

function submitTheForm() {
    if ( (document.theform.password0.value.length >= 10) && (document.theform.password1.value.length >= 10) && (document.theform.password2.value.length >= 10) && (document.theform.password0.value.length <= 20) && (document.theform.password1.value.length <= 20) && (document.theform.password2.value.length <= 20) ) {
        document.theform.submit();
    }
    else {
        alert("Au moins un champs obligatoire est vide ou erroné.");
    }
}

</script>

Dans le style message d'erreur super-pas clair, où sans regarder le code j'aurai pas réussi à valider mon nouveau mot de passe, je trouve ça pas mal...

Newsletter

Stay updated with new articles.

0 Comments

No comments yet. Be the first to comment!

Newsletter

Stay updated with new articles.

Copyright © 2026 · Olivier Girardot's RamblingsPowered by Writizzy