Roles and differences between disabled and readonly _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
Readonly is to lock this control, where disabled and readonly are the same, the user can lock this control and cannot change its value, but the disabled is more thorough 1: readonly is used to lock the control and cannot be modified on the interface (but it can be modified through javascript ).

2: If disabled and readonly are the same, the user can lock this control and cannot change its value. However, disabled is more thorough, so that you cannot use it at all, this includes changing the background color (do not believe it, you modify an input text box that is disabled, and you find that you are in vain). If it is a checkbox, you cannot select it.

3: All controls have the disabled attribute, but not necessarily the readonly attribute. For example, select drop-down box

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.