Home  >  Article  >  Web Front-end  >  Set select to be read-only and not editable and the value of select to be transferable

Set select to be read-only and not editable and the value of select to be transferable

高洛峰
高洛峰Original
2017-03-01 14:45:592603browse

When the attribute is set to disabled, the value of select cannot be passed when submitting the form. Just remove the disabled attribute before submitting. 1.

This seems more direct, Intuitively, it feels like it is read-only, and you cannot click or pull down. The words inside will also turn gray

When the attribute is set to "disabled", the value of select cannot be passed when submitting the form. Remove the disabled attribute before submitting $("#role").removeAttr(" disabled");

jquery adds attribute $("#role").attr("disabled","disabled");

More settings select is read-only, not editable and the value of select Please pay attention to the PHP Chinese website for relevant articles that can be delivered!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn