Can HTML checkboxes be set to readonly?

前端 未结 30 1692
無奈伤痛
無奈伤痛 2020-11-22 08:39

I thought they could be, but as I\'m not putting my money where my mouth was (so to speak) setting the readonly attribute doesn\'t actually seem to do anything.

I\'d

30条回答
  •  逝去的感伤
    2020-11-22 08:47

    you can use this:

    
    

    This works because returning false from the click event stops the chain of execution continuing.

提交回复
热议问题