]; 2. Set the input to the unused status, the code is [ ]; 2. Set the input to the unused status, the code is [

Home  >  Article  >  Web Front-end  >  How to disable text box input in html

How to disable text box input in html

coldplay.xixi
coldplay.xixiOriginal
2021-04-27 15:55:307586browse

htmlHow to disable text box input: 1. Set the input to read-only status, the code is [9ab0d7627dd029de7cfee97dc8571f54]; 2. Set the input to not used Status, the code is [

The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.

htmlMethods to prohibit text box input:

There are two methods to prohibit text box input:

1. Set input to Read-only state, the code is as follows:

<input readonly="readonly" value="test1"/>

2. Set input to unused state, the code is as follows:

<input disabled="disabled" value="test2"/>

Two styles of HTML text field:

1. Text field without scroll bar (no border);

<textarea   style="border:   0;   overflow:   auto;   color:   #FFFFFF;   background-image:   url(http://expert.csdn.net/images/csdn.gif)"></textarea>

2. Text field with red border;

<textarea   style="border:   #FF0000   1px   solid;   overflow:   visible;   color:   #FFFFFF;   background-image:   url(http://expert.csdn.net/images/csdn.gif)"></textarea>

Related learning recommendations: html video tutorial

The above is the detailed content of How to disable text box input in html. 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