What is the difference between disabledreadonly and disabledreadonly?

Source: Internet
Author: User

What is the difference between disabledreadonly and disabledreadonly?

What is the difference between disabled and readonly:
These two attributes are similar, but the difference is huge. The reason for this is that both attributes seem to be able to set the specified element to the "unavailable" state, the following is a brief introduction of the differences between them, hoping to help you.
I. Different functions:
The disabled attribute can use all form elements.
The readonly attribute is valid only for <input type = "text">, <textarea>, and <input type = "password">.
2. Different Effects on elements:
The disabled attribute prevents all operations on elements, such as getting focus and clicking events.
The readonly attribute only sets the element to read-only. Other operations are normal.
3. submit expressions:
The disabled attribute prevents the value of the form element from being submitted.
The readonly attribute does not affect the submission.

The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 9495.

Related Article

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.