HTML web page form code writing?
1, we open Notepad into the following interface.
2, we have to enter the production of a form of labeling, the box, this label inside, we entered an additional border=\”1\”, this is the meaning of the border for 1.
3, we all know that the form is composed of rows and columns, html is a line of input, we need to enter the following chart within the box of the line of labels.
4, a line is composed of more than one column, we need to enter a line of data in each column, we need the following chart box label, the label we enter the name as the content, so that the form of the first line of the first column of the content.
5, so we can make a two-line, two-column form, code.
6, after opening the page, the table in the figure below.
How to design a web page form?
Overview of a form
The form, the role of the web page can not be underestimated, is mainly responsible for the function of data collection, for example, you can collect the visitor’s name and e-mail address, questionnaires, guestbooks and so on.
1, the composition of the form
A form has three basic components: form labels: this contains the processing of form data used in the CGI program’s URL and data submitted to the server method. Form field: contains a text box, password box, hidden fields, multi-line text boxes, check boxes, radio boxes, drop-down selection box and file upload box. Form Buttons: includes submit button, reset button and general button; used to transfer data to CGI scripts on the server or to cancel input, form buttons can also be used to control the processing of other defined processing scripts. In order to take into account different web design tools, this article only about the design of the code, not specifically about the operation, the following is the form of HTML code design points:
1.1 form tags <form>
In a web page to do a form “username, password, personal preferences " click " submit " on another web page to show the contents of the fill in the code to write
write right away, you wait
1.asp code is as follows:
< formaction=”2.asp” method=”post” name=”form1″>
Username:<inputtype=”text” name=”username” size=”20″/><br/>
Password:<inputtype=”text” name=”username” size=”20″/><br/>
Password:<inputtype=”text” name=”username” size=”20″/>
Password: <inputtype=”text” name=”username” size=”20″/>
Personal preferences:<inputtype=”text “name=”other “size=”20″/><br/>
<inputtype=”submit “name=”b1 “value=”submit”/>
</form>
2.asp code is as follows;
<%
response.write “username:”& request(“username”)&”<br/>password:”&request(“psword”)&”<br/>personal preference:”&request(“other”)
%>
Two files into the in the same folder, run 1.asp, point submit