How to hide text box in html

青灯夜游
Release: 2023-01-06 11:13:11
Original
11147 people have browsed it

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.

How to hide text box in html

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="">
Copy after login

Works on all text boxes (hidden fields, mostly used for Store data)

Method 2:

<input type="text" value="" style="display:none">
Copy after login

After the object is hidden, the object does not occupy any space

Method 3:

<input type="text" value="" style="visibility:hidden">
Copy after login

After the object is hidden, there are Occupying the corresponding space

Method 4:

<input type="text" value="" style"width:0;height:0;">
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template