The input value of the disabled property cannot be obtained when the HTML form is submitted

Source: Internet
Author: User

Input field when disabled is, cannot get the value, cannot change the value, so when the form is submitted, the value is not obtained. This problem can be solved with randomly.

<name= "Country"  ID= "Country"  size   Valuedisabled= "Disabled">

However, disabled = "disabled" will be replaced with randomly= "randomly" to obtain the value successfully.

According to the specifications of the consortium:

Input that is set to disabled will have the following restrictions: 1. Cannot receive focus 2. When you use the TAB key, you will be skipped 3. Input that is set to ReadOnly may not be successful with the following restrictions: 1. Can receive focus but cannot be modified by 2. You can use the TAB key to navigate 3. It could be successful. Only successful form elements are valid data, which can be submitted. The text input box for disabled and readonly can only be modified by scripting the Value property. One, to see the difference between the two properties in effect and use of 1 ReadOnly is to lock this control, through the interface cannot modify him (but through JavaScript can modify him). 2 disabled and ReadOnly have the same place also can lock this control user cannot change his value, but disabled more thoroughly, he is going to make you completely unable to use him, including changing his background color (unbelief, You go to modify a disabled input text box, you find that you are in vain), if it is a checkbox you can not select him. 3 All controls have the disabled property, but there is not necessarily a readonly property, such as the Select drop-down box. 4) button Buttons Description: Click the readonly off button can also trigger the event, but the disabled off the button will not be used regardless of whether there is no event. Description: After the DIV is set to the Disabled property, the entire div is grayed out, but the text box can still be entered. Note: The Select drop-down selection box is not ReadOnly property of the reprint to: 51985147

The input value of the disabled property cannot be obtained when the HTML form is submitted (GO)

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.