Activer et désactiver les champs d’un formulaire
bonjour tout le monde
je n'arrive pas à désactiver un champ si je click sur bouton
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<html>
<head>
<SCRIPT LANGUAGE="JavaScript"><!--
function activer() {
document.form.prenom.disabled=false;
document.form.nom.disabled=false;
}
//-->
</SCRIPT>
</head>
<body>
<form action="" method="" name="form">
<input type="text" name="prenom" disabled="true" id="prenom" />
<input type="submit" name="Submit" value="rechercher" onfocus="desactiver()" />
</form>
</body>
</html> |