Home  >  Article  >  Web Front-end  >  How to send hidden data using the hidden input tag in HTML

How to send hidden data using the hidden input tag in HTML

不言
不言Original
2019-01-16 14:42:5610974browse

Input is a label, which can also be called a component that makes up the form. By changing the type attribute, various formats can be input. Using the type attribute, you can also enter single-line text input and passwords, check boxes, radio buttons and files. In this article, we will take a look at the hidden method of the input tag to send hidden data.

How to send hidden data using the hidden input tag in HTML

How to use type="hidden"

Let’s look at the following code example

The operation effect is as follows

How to send hidden data using the hidden input tag in HTML

When the type attribute is set to hidden, no content will be displayed on the browser.

When viewing the source code using your browser's validation tool, you can see that there is a section where the type attribute is hidden.

How to send hidden data using the hidden input tag in HTML

An important effect of setting the type attribute to hidden is that the data to be sent will not be displayed in the browser.

Sometimes we use hidden to use invisible content on the browser to determine the type of command the user sends to the server.

However, even if you can't see it in the browser, you can see the value being sent by looking at the source code.

The above is the detailed content of How to send hidden data using the hidden input tag 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