Home >Web Front-end >HTML Tutorial >How to set select to be read-only and not editable and the value of select to be transferable_HTML/Xhtml_Web page production

How to set select to be read-only and not editable and the value of select to be transferable_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:37:081497browse

1.

This seems more direct, and intuitively it has a read-only feel, and cannot be clicked or pulled down. The words inside will also turn gray

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

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

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