What is a hidden domain?
Hidden fields are actually the labels of hidden forms in html webpage code. You can write Value Sets in them, but they are not displayed on the webpage surface. <Input type = "hidden" name = "" id = "" value = "123456"/>.
Visible type = "hidden" indicates that it is a hidden field. Some value Sets are saved in the value and obtained and modified by name, id, or other methods.
It can be used for many purposes, such as value passing and security. When you lack a value, you can hide it on the page without displaying it. Functions are the same as other inputs, except that the user cannot directly see them, which is used to assist the server in performing some operations.
Hidden fields are invisible to users on the page. The purpose of inserting a hidden field in a form is to collect or send information to facilitate use by the form processing program, the following describes how to use this hidden domain in practice:
Basic Syntax:
<input type="hidden" name="field_name" value="value">
Purpose:
1. The hidden field is invisible to users on the page. The purpose of inserting a hidden field in a form is to collect or send information to facilitate the use of the form processing program. When a viewer clicks the send button to send a form, information about hidden fields is also sent to the server.
2. Sometimes we need to give the user a message so that the user can submit the form to determine the user identity, such as sessionkey. of course, these things can also be implemented using cookies, but it is much easier to use hidden domains. there will be no browsers that do not support it, and users will be troubled by disabling cookies.
3. Sometimes there are multiple submission buttons in a form. How can I make the program clearly know that the user submitted the form by that button? We can write a hidden field and add onclick = "document. form. command. value = "xx" ". After receiving the data, we first check the value of command to know which button the user has submitted.
4. Sometimes a webpage has multiple forms. We know that multiple forms cannot be submitted at the same time, but sometimes these forms do interact with each other, we can add hidden fields to form to associate them.
5 javascript does not support global variables, but sometimes we have to use global variables, so that we can first store the value in a hidden field and its value will not be lost.
6. For example, if you press a button to bring up four small windows, the other three are automatically closed when you click a small window. however, IE does not support mutual calls between small windows. Therefore, you only need to write a hidden field in the parent window. When the value of the hidden field in the small window is close, you can turn it off.