Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Titre du document</title>
<style>
input{
border:1px solid #ccc ;
margin-bottom:10px;
padding:2px 5px;
}
input[type=text]:enabled {
background: #eee;
}
input[type=text]:disabled {
background: #ccc;
}
</style>
</head>
<body>
<h2>Exemple du sélecteur :enabled</h2>
<form action="">
<label for="name">Prénom:</label>
<input type="text" value="John" id="name"><br>
<label for="lastname">Nom:</label>
<input type="text" value="Smith" id="lastname"><br>
<label for="country">Pays:</label>
<input type="text" disabled="disabled" value="10 High Street" id="country">
</form>
</body>
</html>