Home >Web Front-end >Bootstrap Tutorial >How to implement non-editable bootstrap input

How to implement non-editable bootstrap input

藏色散人
藏色散人Original
2020-12-07 09:52:284072browse

How to implement non-editable bootstrap input: first open the corresponding code file; then set the disabled attribute for the input input box, with statements such as "placeholder="Disabled input here..." disabled".

How to implement non-editable bootstrap input

The operating environment of this tutorial: Windows 7 system, bootsrap version 3.3.7, Dell G3 computer.

bootstrap input is not editable

In Bootstrap, setting the disabled attribute for the input input box can prohibit any interaction with the user (focus, input, etc.). Disabled input boxes are lighter in color, and a not-allowed mouse state has been added.

<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>

Rendering:

How to implement non-editable bootstrap input

disabled attribute

The disabled attribute is a Boolean attribute.

The disabled attribute specifies which elements should be disabled.

Disabled input elements are unusable and unclickable.

disabled attribute is set so that users can use the element only when certain conditions are met (such as checking a check box, etc.). You can then use JavaScript to remove the disabled value, making the element available.

Tip: Disabled elements in the form will not be submitted.

Note: The disabled attribute does not apply to .

Recommended: "bootstrap video tutorial" "css video tutorial"

The above is the detailed content of How to implement non-editable bootstrap input. For more information, please follow other related articles on the PHP Chinese website!

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