web表单实验

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>成都最后一个ikun</title>
    </head>
    <body>
        <form>
            <table border="1" cellspacing="0" width="400" bgcolor="#d3c6a6">
                <tr>
                <td align="center" bgcolor="#c0c0c0" colspan="2">用户注册</td>
                </tr>
                <tr>
                    <td align="right" width="400">用户名:<name=UserName></td>
                    <td width="400"><input type="text"  size="15" maxlength="20"></td>
                </tr>
                <tr>
                    <td align="right" width="400">密码</td>
                    <td width="400"><input type="text" size="15" maxlength="20" name="UserPass"></td>
                </tr>
                <tr>
                    <td width="400" align="right">性别</td>
                    <td width="400"><input type="radio" name="sex" value="男" checked="true">男
                    <input type="radio" name="sex" value="女">女</td>
                </tr>
                <tr>
                    <td align="right" width="400">爱好</td>
                    <td width="400"><input type="checkbox" name="唱">唱
                    <input type="checkbox" name="跳">跳
                    <input type="checkbox" name="rap">rap
                    <input type="checkbox" name="篮球">篮球</td>
                </tr>
                <tr>
                    <td align="right" width="400">省份</td>
                    <td width="400"><select name="省份">
                    <option selected="陕西" value="陕西">陕西</option>
                    <option value="北京">北京</option>
                    <option value="四川">四川</option>
                    <option value="上海">上海</option>
                    <option value="重庆">重庆</option>
                    <option value="贵州">贵州</option>
                    <option value="辽宁">辽宁</option>
                    <option value="广东">广东</option>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="400">自我介绍</td>
                    <td><textarea name="indroduce" cols="25" rows="5"></textarea></td>
                </tr>
                <tr>
                    <td colspan="2" align="center" bgcolor="#c0c0c0">
                        <input type="submit" name="submit" value="提交">
                        <input type="reset" name="reset" value="reset">重置
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个简单的注册表单的HTML代码示例,包含了用户名、密码、确认密码、电子邮件和提交按钮: ```html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>注册表单</title> </head> <body> <h1>注册</h1> <form action="register.php" method="post"> <label for="username">用户名:</label> <input type="text" id="username" name="username" required><br><br> <label for="password">密码:</label> <input type="password" id="password" name="password" required><br><br> <label for="confirm_password">确认密码:</label> <input type="password" id="confirm_password" name="confirm_password" required><br><br> <label for="email">电子邮件:</label> <input type="email" id="email" name="email" required><br><br> <input type="submit" value="提交"> </form> </body> </html> ``` 在这个示例中,`form` 元素的 `action` 属性指定了表单数据将被提交到的服务器端脚本的URL(在这里是 `register.php`),而 `method` 属性指定了提交表单的HTTP方法(在这里是 `POST`)。每个表单域都有一个 `name` 属性和一个对应的 `label` 元素,它们一起跟踪表单中的数据。`required` 属性指定了该表单域是必填项,如果用户没有填写该项,提交按钮将不可用。 当用户单击提交按钮时,表单数据将被提交到 `register.php` 脚本。你需要使用PHP或其他服务器端语言来处理该请求,并将表单数据保存到数据库或其他持久化存储中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值