The function and difference of disabled and readonly


1: readonly is to lock this control. You cannot modify it through the interface (but you can modify it through JavaScript).

2: disabled and readonly have the same thing. You can also lock this control. The user can’t change its value, but disabled is more thorough. It means that you can’t use it at all, including changing its background color (if you don’t believe it, you can modify an input text box that has been disabled, and you find it’s in vain). If it’s a checkbox, you can’t select it.

3: all controls have the disabled property, but not necessarily the readonly property. Such as select drop-down box

Recommended Today

Flutter synthetic games

Flutter synthetic gamesGitHub source address: init.gif To realize the function, we need to understand the two shutter controls draggable and dragtarget It can be seen from the literal meaning that draggable can be dragged, and dragtarget is the drag target, which is to receive the control of draggable ddd.png We can only receive controls that […]