html
<title>注册页面</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
h2 {

text-align: center;
}
label {
display: block;
margin-bottom: 10px;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
}
input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: white;

border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
<div class="container">
<h2>注册新用户</h2>
<form action="/register" 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>
<input type="submit" value="注册">
</form>
</div>
这个页面包含一个简单的注册表单,用户需要输入用户名和密码,表单的action属性设置为 "/register",表示提交表单时将数据发送到服务器的 "/register" 路径。method属性设置为 "post",表示以 POST 方法提交数据,输入框使用了required属性,确保用户必须填写用户名和密码,样式部分用于美化页面,使其看起来更加整洁和友好。





