The :read-write
selector
selects form elements with no "readonly
" attribute, and no "disabled
" attribute.
:read-write { style properties }
:read-write |
Yes | No | Yes | Yes | Yes |
<!DOCTYPE html>
<html>
<head>
<style>
input:-moz-read-write { /* For Firefox */
background-color: red;
}<!--from w ww . j a va 2 s . c om-->
input:read-write {
background-color: red;
}
</style>
</head>
<body>
<p>A normal input element:<br><input value="hello"></p>
<p>A readonly input element:<br><input readonly value="hello"></p>
</body>
</html>