HTML 简单实现注册页界面

1.程序代码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>按钮测试</title>
</head>
<body>
<link href="test.css" rel="stylesheet"type="text/css">
<div class="mr-cont">
    <h2 style="text-align: center">注册</h2>
    <hr width="500" color="black" >
    <form>
        <div>*&nbsp;&nbsp;用户名:&nbsp;&nbsp;&nbsp;
            <input type="text" placeholder="字符串长度为6-20,包含数字和字母" id="nm">
        </div>
        <div>*&nbsp;&nbsp;电子邮箱:
            <input type="text" placeholder="输入正确的电子邮箱地址"id="nm">
        </div>
        <div>*&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;码:&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="password" placeholder="设置密码"id="nm">
        </div>
        <div>*&nbsp;&nbsp;确认密码:
            <input type="password" placeholder="确认密码必须与密码一致"id="nm">
        </div>

    </form>


<div id="btn" align="center" >
    <input type="submit" value="提交">
</div>
</div>
</body>
</html>

2.效果图:

 

  • 1
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,下面是一个简单注册登录界面HTML 代码: ```html <!DOCTYPE html> <html> <head> <title>注册登录界面</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { font-family: Arial, sans-serif; background-color: #f2f2f2; } form { max-width: 500px; margin: 0 auto; background-color: #fff; padding: 20px; box-shadow: 0 0 10px rgba(0,0,0,0.2); } input[type=text], input[type=password] { width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } button[type=submit] { background-color: #4CAF50; color: white; padding: 14px 20px; margin: 8px 0; border: none; border-radius: 4px; cursor: pointer; width: 100%; } </style> </head> <body> <form> <h2>用户注册</h2> <label for="username"><b>用户名</b></label> <input type="text" placeholder="请输入用户名" name="username" required> <label for="password"><b>密码</b></label> <input type="password" placeholder="请输入密码" name="password" required> <label for="repeat-password"><b>确认密码</b></label> <input type="password" placeholder="请再次输入密码" name="repeat-password" required> <button type="submit">注册</button> </form> <form> <h2>用户登录</h2> <label for="username"><b>用户名</b></label> <input type="text" placeholder="请输入用户名" name="username" required> <label for="password"><b>密码</b></label> <input type="password" placeholder="请输入密码" name="password" required> <button type="submit">登录</button> </form> </body> </html> ``` 这个代码实现一个简单注册登录界面,其中包含了两个表单,分别用于用户注册和用户登录。用户可以输入用户名和密码进行登录或注册。需要注意的是,这个代码只是一个示例,如果要用于实际项目中,还需要进行更多的细节处理和安全性验证。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值