HTML实现简单注册登录页面

以下两个页面均只用HTML实现(其中注册若要添加号码与后面的登录密码判断,涉及到javascript的内容,本文只使用了html,后续会加上这些内容)

简单注册:(读者可以自行增加图片以及其他属性)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML注册页面</title>
</head>
<body>
    <h2>注册</h2>
    <table width="500">
        <tr>
            <td>姓名:</td>
            <td>
                <input type="text" value="张三">
            </td>
        </tr>
        <tr>
            <td>性别:</td>
            <td>
                <input type="radio" name="sex" checked="checked">男
                <input type="radio" name="sex">女
            </td>
        </tr>
        <tr>
            <td>出生日期:</td>
            <td>
               <select>
                   <option>--请选择年份--</option>
                   <option>2001</option>
                   <option>2002</option>
                   <option>2003</option>
               </select> 
               <select>
                    <option>--请选择月份--</option>
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                    <option>6</option>
                    <option>7</option>
                    <option>8</option>
                    <option>9</option>
                    <option>10</option>
                    <option>11</option>
                    <option>12</option>
                </select> 
                <select>
                    <option>--请选择日期--</option>
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                </select> 
            </td>
        </tr>
        <tr>
            <td>密码:</td>
            <td>
                <input type="password" size="20" maxlength="10" value="">
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <input type="submit" value="提交">
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <a href="Login-1.html">若已有注册信息,可点击此按钮登录系统</a>
            </td>
        </tr>
    </table>
</body>
</html>

登录:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login</title>
</head>
<body>
    <h2>登录</h2>
    <table>
        <tr>
            <td>姓名:</td>
            <td>
                <input type="text">
            </td>
        </tr>
        <tr>
            <td>密码:</td>
            <td>
                <input type="password" size="20" maxlength="10">
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <input type="submit" value="登录">
            </td>
        </tr>
    </table>
</body>
</html>

 

 

  • 13
    点赞
  • 114
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 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
发出的红包

打赏作者

m0_57714421

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值