How to Set a select read-only statement that cannot be edited and the select value can be passed _ HTML/Xhtml _ webpage Creation
Source: Internet
Author: User
When the attribute is set to disabled, the select value cannot be passed when the form is submitted. You can remove the disabled Attribute before submission. This method makes the drop-down box no different from normal ones and does not seem any different. The only difference is that, after a single drop-down and selection, it will not bird you, and it will be the same as not selected. Is to ignore the customer's choice. 2. Set the disabled attribute
This looks more direct and intuitive, that is, there is a read-only feeling, and you cannot click or drop down. The characters in it will become gray.
When the attribute is set to "disabled", the select value cannot be passed when the form is submitted. Before submission, remove the disabled attribute $ ("# role"). removeAttr ("disabled ");
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