分享好友 资讯首页 资讯分类 切换频道

登录注册页面模板

2025-11-22 08:3070

html

<title>登录/注册页面</title>

<!-- 引入CSS样式 -->

<link rel="stylesheet" type="text/css" href="styles.css">

<div id="header">

<h1>欢迎访问我们的网站!</h1>

</div>

<div id="login-register-container">

<!-- 登录表单 -->

<div id="login-form">

<h2>登录</h2>

登录注册页面模板

<form action="/login" method="post">

<label for="username">用户名:</label><br>

<input type="text" id="username" name="username" required><br>

<label for="password">密码:</label><br>

<input type="password" id="password" name="password" required><br>

<input type="submit" value="登录">

</form>

</div>

<!-- 注册表单 -->

<div id="register-form">

<h2>注册</h2>

<form action="/register" method="post">

<label for="newUsername">用户名:</label><br>

<input type="text" id="newUsername" name="newUsername" required><br>

<label for="newPassword">密码:</label><br>

<input type="password" id="newPassword" name="newPassword" required><br>

<!-- 可以添加更多字段如邮箱,姓名等 -->

<input type="submit" value="注册">

</form>

</div>

</div>

<!-- 引入JavaScript脚本(如果有的话) -->

<script src=https://www.qq959.com/static/image/nopic320.png

这个模板包含了基本的登录和注册表单,每个表单都有一个文本输入框用于输入用户名和密码,以及一个提交按钮,在实际应用中,你需要根据你的后端逻辑来设置表单的 action 属性和 method 属性,你可能还需要添加更多的字段来收集用户信息,比如邮箱,姓名等,你也需要添加适当的CSS样式来美化页面,以及JavaScript脚本来增加交互性和功能。
举报
收藏 0
打赏 0
评论 0
 
友情链接