Edit This Code:
See Result »
<!DOCTYPE html> <html> <head> <style> input:-moz-read-write { /* For Firefox */ background-color: yellow; } input:read-write { background-color: yellow; } </style> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "//hm.baidu.com/hm.js?73c27e26f610eb3c9f3feb0c75b03925"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </head> <body> <h3>A demonstration of the :read-write selector.</h3> <p>A normal input element:<br><input value="hello"></p> <p>A readonly input element:<br><input readonly value="hello"></p> <p>The :read-write selector selects form elements with no "readonly" attribute.</p> <p><strong>Note:</strong> The :read-write selector is not supported in Internet Explorer.</p> <p><strong>Note:</strong> Firefox supports an alternative, the :-moz-read-write property.</p> </body> </html>
Result: