How to create HTML login registration interface?

How to make a simple registration interface without learning CSS styles.

1. Form tag (form)

First, we write a <form></form> tag. The form tag belongs to the form tag. Usually our login and registration interface has data submission, which is used to interact with the server. After the user submits the information, he sends it to the server. The server then saves it based on the submitted information. At this time, the form tag is needed.

There are two common attributes in form tags:

action: This is the address where the form is submitted to a server.

method: How to submit. Usually we see two types: get (get, become) and post. The difference is whether the user displays plain text or dark text when writing information.

Get: The submission has a length limit, and the encoded content address bar is visible. (Not safe, use less)

<form action="指向交给谁,网页地址" method="get"数据提交方式" />
//传递的值是有长度限制的。浏览器的地址栏里面可以看到。特殊时用。

Post: There is no length limit for submissions, and the encoded content is invisible.

<form action="指向交给谁,网页地址" method="post"数据提交方式" />
//传递的值没有长度限制,浏览器的地址栏里面不可以看到。常用。
<form action="http://www.baidu.com" method="get"></form>

2. Text input

There are several formulas for text input:

//① 文本框公式
<input tyfe="text做文本框的" name="用户名" value="值"/>
//②密码框公式
<input tyfe="password" name="名字" value="值"/>
//密码框可以让用户输入的密码显示为黑点。
//③隐藏域公式
<input tyfe="hidden" name="名字" value="值"/>
//这个提交表单是可以提交的,但是用户是看不到的。
//④文本域公式(多行文本)
<textarea name="名字" cols="字符多少" rows="几行高"</textarse>
//非常大的区域,用户可以在里面写文章。

1. User registration

First make a user registration interface, we write it in a text box:

<form action="http://www.baidu.com" method="get">
            
            <table>
                
                <tr>        
                    
                    <td>用户名:</td>
                    <td>
                        <!--<input type="text" name="userid" value="" placeholder="登录名"/>-->
                        <input type="text" name="user" value=""/>
                    </td>
                        
                </tr>
    
                
            </table>
                
        </form>

Because I only wrote one item, the entire form box is still invisible.

2. Password box

<tr>
                    <td>密码:</td>
                    <td>
                        <input type="password" name="pw" value="" />
                    
                    </td>

3. Confirm password

It's the same as the password box. It is a common step.


3. Selection box

1. Radio button (gender option)

<tr>
                
                    <td>性别:</td>
                    <td>
                        <input type="radio" name="sex"  id="man1" value="1" />
                        <label for="man1">男</label>
                        <input type="radio" name="sex" id="man2" value="0" />
                        <label for="man2">女</label>
                                            
                    </td>                
                </tr>

2. Check box

Make one similar to the hobby type:

<tr>
                    <td>爱好:</td>
                    <td>
                    
                        <input id="a1" type="checkbox" name="love" value="a" />
                        <label for="a1">抽烟</label>
                        
                        <input id="b1" type="checkbox" name="love2" value="b" />
                        <label for="b1">喝酒</label>
                        
                        <input id="c1" type="checkbox"  name="love3" checked="checked" value="c"/>
                        <label for="c1">美女</label>

                    </td>


4. Drop-down list box

Drop-down list tag: <select></select>

<selet name="name" size="list when equal to 1" multiple="multiple" means multiple selection/>

 Ethnicity is listed as:

<tr>
                
                    <td>民族:</td>
                    <td>
                        <select name="nation">
                            <option value="1" selected>汉族</option>
                            <option value="2">满族</option>
                            <option value="3">苗族</option>
                            <option value="4">回族</option>
                            <option value="5">彝族</option>
                            <option value="6">傣族</option>
                         </select>

                    </td>

                </tr>

6. Button

//1、普通按钮

<input type="button" name="按钮名字" value="值"/>

//如果想让用户读不到,那么可以添加一下:

<input type="button" name="按钮名字" disabled="disabled" value="值"/>

//2、提示按钮

<input type="submit" name="按钮名字" valer="值"/>

//如果想让用户读不到,那么可以添加一下:

<input type="submit" name="按钮名字" disabled="disabled" value="值"/>

//3、重置按钮

<input type="reset" name="按钮名字" valer="值"/>


//如果想让用户读不到,那么可以添加一下:

<input type="reset" name="按钮名字" disabled="disabled" value="值"/>

//4、图片按钮

<input type="image" name="按钮名字" src="图片地址"/>

//如果想让用户读不到,那么可以添加一下:

<input type="image" name="按钮名字" disabled="disabled" src="图片地址">

Register button example:

<tr>
                    <td colspan="2">
                        <input type="submit" value="注册" />
                        <input type="reset" value="重置" />
                        <input type="image" src="HTML/1.gif" />

                    </td>
               </tr>

It ends here!

How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface? How to create HTML login registration interface?

Guess you like

Origin blog.csdn.net/qq_41221596/article/details/132819127