0
<script type="text/javascript"> function generer_password(champ_cible) { var ok = 'azertyupqsdfghjkmwxcvbn23456789AZERTYUPQSDFGHJKMWXCVBN'; var pass = ''; longueur = 5; for(i=0;i<longueur;i++){ var wpos = Math.round(Math.random()*ok.length); pass+=ok.substring(wpos,wpos+1); } document.getElementById(champ_cible).value = pass; } /* <input name="password" id="password" type="text" /> <input type="button" name="generer" value="Générer" onclick="javascript:generer_password('password');" /> */ </script>
DATE 06 Août 2009