To be honest, whether it is Asp, PHP or JSP for network programming, it is inseparable from interaction with users.
The human-computer dialogue platform basically relies on the corresponding text and list boxes for input, and then submit it to the database through buttons.
Therefore, when learning network programming, you must understand these input platforms related to: forms (form)
The basic format is as follows:
[Ctrl+A All selections are given for copying: you can modify some codes first, and then click Run]
It can be summarized: the form includes relevant content within <form>...</form>.
It can be divided into three categories: input, select, and textarea
First, look at the internal parameters of <form>
Parameter name: Used to represent the unique name of the form, which facilitates the creation of multiple forms on a page without confusion, and of course, it is to accept the confirmation relationship of the page.
Parameter action: Obviously, it means that all content in the current form will be sent to a certain page for processing. Processing includes acceptance of information, database comparison, addition, modification, etc.
Parameter method: that is, the form submission method, including two methods: post and get. Post is to transmit information content, get is to transmit url value. The specific usage will be introduced in the next section "Built-in Object Request".
Second, let’s look at Input related
Input represents an input object in a Form form, which is divided into text input boxes, password input boxes, single-choice/check boxes, submission/reset buttons, etc. depending on the type of type. The following is introduced one by one.
1, type=text
The input type is text, which is the most commonly used one we have seen and used, such as logging in to enter a username, registering to enter a phone number, email, home address, etc. Of course, this is also the default type of Input.
Parameter name: Also represents the name of the text input box.
Parameter size: The length of the input box.
Parameter maxlength: The maximum number of characters allowed in the input box.
Parameter value: the default value in the input box
Special parameter readonly: means that only display in this box, no modification can be added.
[Ctrl+A All selections are given for copying: you can modify some codes first, and then click Run]
2. type=password
Needless to say, the biggest difference between a password input box that you can understand at a glance is that it is displayed as a confidential character when inputting information in this input box.
The parameters are similar to "type=text".