登录页面。

<!DOCTYPE html>
<html>
<head>
<title>登录页面</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
.container {
max-width: 400px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 15px;
margin-bottom: 10px;
border-radius: 5px;
border: 1px solid #ccc;
}
input[type="submit"] {
width: 100%;
padding: 15px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<h2>登录</h2>
<form action="/login" method="post">
<input type="text" name="username" placeholder="用户名" required>
<input type="password" name="password" placeholder="密码" required>
<input type="submit" value="登录">
</form>
</div>
</body>
</html>注册页面:

<!DOCTYPE html> <html> <head> <title>注册页面</title> <!-- 引入相同的CSS样式 --> <!-- ... -->(省略与登录页面相同的部分)<!-- ... --> 省略其他部分与登录页面相同,只需在表单中添加额外的输入字段即可,用户名、密码、电子邮件等,将表单的 action 属性设置为注册页面的处理地址。<form action="/register" method="post">,确保在服务器端实现注册逻辑以处理提交的数据并创建新用户账户,这只是一个简单的示例,实际的登录和注册页面可能需要更多的功能和安全性措施来保护用户数据,确保遵循最佳实践,如使用HTTPS、密码哈希存储等安全措施来保护用户信息的安全。










