Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Titre du document</title> <style> input{ margin-bottom:10px; border:1px solid #ddd; padding:5px; } input:-moz-read-only { background-color: #ccc; } input:read-only { background-color: #ccc; } </style> </head> <body> <h2>Exemple du sélecteur :read-only </h2> <form> <div> <label for="normal">Exemple1</label> <input value="normal input" id="normal"> </div> <div> <label for="read-only">Exemple2</label> <input readonly value="read-only input" id="read-only"> </div> </form> </body> </html>