Does input readonly attribute works for text and textarea only?

71 Views Asked by At

Does input readonly attribute work for text/textarea? If yes, why not it works for select ?

1

There are 1 best solutions below

3
On BEST ANSWER

It works on both input[type="text"] and textarea

It's not meant to work with select, but if you want to prevent user of option selection I suggest using disabled attribute on each option.