Is it possible to set HTML checkboxes as read-only?

I was trying a lot but was not successful. Is it possible to set HTML checkboxes as read-only? If so, can someone please explain?

Comments

  • Just add the disabled attribute as done in the following snippet:

    <input type="checkbox" id="chk" value="somve value" disabled="disabled" checked="checked"/>

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion