When the control sets the Disabled = "disabled" attribute, the background cannot obtain the modified value.

Source: Internet
Author: User
<Input id = "text1" type = "text" Disabled = "disabled"/>

Because the Disabled = "disabled" of the control is disabled, there are two solutions for the background to get the modified value:

1. Since the modified value cannot be obtained only when the control is disabled, follow this idea. before modifying data to the database in the background, set the disabled attribute to false, after obtaining the control value

The disabled attribute is set to true.

2. Set the control property to readonly = "readonly" and read-only. In this case, the control value cannot be modified at the foreground, and the control value can be obtained at the background.

 

When the control sets the Disabled = "disabled" attribute, the background cannot obtain the modified value.

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.