<html>
<head>
<script language = "Javascript">
function verif_multiple_carac(str) {
var i, lg;
var c, s;
lg = str.length;
for(i = 0; i < lg - 1; i++) {
c = str.substring(i, i + 1);
s = str.substring(i + 1, lg);
if (s.indexOf(c) >= 0)
return true;
}
return false;
}
</script>
</head>
<body>
<form name="frmSample">
<input type="text" name="saisie1" id="saisie1">
<p> <input type="button" value="Vérification" onClick=verif_multiple_carac(saisie1.value)>
</form>
</body>
</html> |