HTML CSS examples for CSS Selector:enabled
The :enabled selector selects enabled element elements.
Set a background color for all enabled <input> elements:
<!DOCTYPE html> <html> <head> <style> input:enabled {<!--from w w w. j a v a 2s . c o m--> background: #ffff00; } input:disabled { background: #dddddd; } </style> </head> <body> <form action=""> First name: <input type="text" value="Java"><br> Last name: <input type="text" value="SQL"><br> Country:<input type="text" value="Oracle" disabled><br> Password: <input type="password" name="password" value="psw" disabled><br> E-mail: <input type="email" value="a@example.com" name="usremail"> <textarea disabled row='20' col='20'> </textarea> </form> </body> </html>