Home > Article > Web Front-end > What is the standard way of writing readonly for INPUT tag in HTML? _html/css_WEB-ITnose
After testing:
Search more and try more and you will know.
readonly="true" or readonly="false" This is to set the read-only nature of the tag
XHTML is different from html. The commonly used writing method is readonly="true" or readonly
xhtml is more rigorous, the standard writing method is readonly="readonly" Refer to W3C
disabled="true" The text will turn gray and cannot be edited
readOnly="true" The text will not change color , also cannot be edited