htmlHow to hide the text box: 1. Set the value of the input text box type attribute to "hidden"; 2. Add the "display:none" style to the text box; 3. Add "visibility" to the text box :hidden" style; 4. Set the width and height of the text box to 0.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Four ways to hide text boxes in HTML
Method 1:
<input type="hidden" value="">
Works on all text boxes (hidden fields, mostly used for Store data)
Method 2:
<input type="text" value="" style="display:none">
After the object is hidden, the object does not occupy any space
Method 3:
<input type="text" value="" style="visibility:hidden">
After the object is hidden, there are Occupying the corresponding space
Method 4:
<input type="text" value="" style"width:0;height:0;">
Recommended tutorial: "html video tutorial"
The above is the detailed content of How to hide text box in html. For more information, please follow other related articles on the PHP Chinese website!