Introduction to ASP Programming (II): Understanding the form

Source: Internet
Author: User
Statement: ASP Programming Entry Advanced series article copy from http://www.cnbruce.com/blog/part run code please go to the station for online testing
To tell the truth, whether it is asp,php or JSP for network programming, can not be separated from the user interaction.
and man-machine conversation platform, basically rely on the corresponding text, list box input, and then through the button submitted to the database.
So learning network programming must be aware of these input platform related things: forms (Form)
The basic format is as follows:
<form name= "Form1" action= "xxx.asp" method= "POST" >
<input type= "text" name= "Yourname" >
<select name= "Selectwhat" >
<option>aaa</option>
<option>aaa</option>
</select>
<textarea name= "Textinit" rows=5 cols=10></textarea>
</form>
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]
Can be summed up: The form is included in the relevant content within <form>...</form>.
The interior can be divided into three main categories: Input,select,textarea
First, look at the <form> internal parameters
Parameter name: Used to represent the unique name of the form, to facilitate a page to create multiple forms without confusing, and of course, to accept the page's confirmation relationship.
Parameter action: It is obvious that all content in the current form will be sent to a page for processing. Processing includes receiving information, database comparisons, additions, modifications, and so on.
Parameters method: The form's submission method, including two methods: Post and get. Post is the transmission of information content, get is the transfer URL value, the specific usage will be described in the next section, "Built-in object request"
Second, to look at the input related
Input represents an input object in form forms that is divided into text input boxes, password input boxes, radio/check boxes, submit/reset buttons, and so on, as described below.
1,type=text
input type is text, this is the most we see is also used most, such as login to enter the user name, registration input phone number, email, home address and so on. Of course this is also the default type of input.
Parameter name: The same is the name of the text input box that is represented.
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: Indicates that the box can only be displayed, you cannot add modifications.
<form>
Your name:
<input type= "text" name= "yourname" size= "maxlength=" "value=" the length of the input box is 30, allowing the maximum number of characters to be "><br>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.