Home > Web Front-end > H5 Tutorial > Sample code sharing on how to implement user registration form in html5

Sample code sharing on how to implement user registration form in html5

黄舟
Release: 2017-07-24 10:18:27
Original
5548 people have browsed it


User Registration

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>用户注册</title></head><body>
    <h2>用户注册</h2>
    <form action="" method="post">
        <!-- 隐藏域 -->
        <input type="hidden" name="uid" value="9527" />
        <table border="0" cellpadding="0" cellspacing="0" width="400px">
            <tr>
                <td align="right"><label for="name">姓名:</label></td>
                <td><input type="text" name="name" id="name"/></td>
            </tr>
            <tr>
                <td align="right">用户名:</td>
                <td><input type="text" name="username"  readonly="readonly" value="tom"/></td>
            </tr>
            <tr>
                <td align="right">密码:</td>
                <td><input type="password" name="pwd"/></td>
            </tr>
            <tr>
                <td align="right">确认密码:</td>
                <td><input type="password" name="repwd"/></td>
            </tr>
            <tr>
                <td align="right">电子邮箱:</td>
                <td><input type="text" name="email"/></td>
            </tr>
            <tr>
                <td align="right">性别:</td>
                <td>
                    <input type="radio" name="sex" value="male" checked="checked" id="male" />
                    <label for="male"><img src="images/Male.gif"/>男</label>                     
                    <input type="radio" name="sex" value="female"/>
                    <img src="images/Female.gif"/>女                </td>
            </tr>
            <tr>
                <td align="right">头像:</td>
                <td><input type="file" name="touxiang"/></td>
            </tr>
            <tr>
                <td align="right">爱好:</td>
                <td>
                    <input type="checkbox" name="hobby" value="eat" checked="checked" />吃饭                      
                    <input type="checkbox" name="hobby" value="sleep" />睡觉                      
                    <input type="checkbox" name="hobby" value="doudou" />打豆豆                  
                    </td>
            </tr>
            <tr>
                <td align="right">出生日期:</td>
                <td>
                    <input type="text" name="year" size="10"/>年                     
                    <select name="month">
                        <option value="0" selected="selected">--月份--</option>
                        <option value="1">一月</option>
                        <option value="2">二月</option>
                        <option value="3">三月</option>
                        <option value="4">四月</option>
                        <option value="6">六月</option>
                    </select>月                      
                    <input type="text" name="day" size="6"/>日                
                    </td>
            </tr>
            <tr>
                <td align="right">注册协议:</td>
                <td>
                    <textarea rows="4" cols="20" name="intr" readonly="readonly">
                        请遵守相关法律法规。。。                   
                         </textarea>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" value="注册" disabled="disabled" />                      
                    <input type="image" src="images/reset.gif" />                      
                    <!--<input type="button" value="普通按钮"/>
                --></td>
            </tr>
        </table>    
    </form></body></html>
Copy after login

The above is the detailed content of Sample code sharing on how to implement user registration form in html5. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template