Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

บทบาทของ CSS :Read-write Selector


ใช้ CSS :read-write selector เพื่อเลือกองค์ประกอบที่ 'อ่านได้' และ 'เขียนได้'

ตัวอย่าง

คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อใช้ตัวเลือก :read-write:

<!DOCTYPE html>
<html>
   <head>
      <style>
         input:read-write {
            background-color: blue;
            color: white;
         }
      </style>
   </head>
   <body>
      <form>
         Subject: <input type = "text" name = "subject" value = "Java"><br>
         Student: <input type = "text" name = "student" readonly value = "Amit"><br>
      </form>
   </body>
</html>