htmlHow to disable text box input: 1. Set the input to read-only status, the code is [<input readonly="readonly" value="test1"/>]; 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"/>Copy after login2. Set input to unused state, the code is as follows:
<input disabled="disabled" value="test2"/>Copy after loginTwo 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>Copy after login2. 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>Copy after loginRelated 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!