学生管理系统登录界面代码
时间: 2023-10-11 17:08:45 浏览: 81
以下是一个简单的学生管理系统的登录界面代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>学生管理系统 - 登录</title>
<meta charset="utf-8">
<style>
form {
width: 300px;
margin: 100px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
box-shadow: 0px 0px 10px #ccc;
}
label {
display: block;
margin-bottom: 10px;
font-weight: bold;
}
input[type="text"], input[type="password"] {
display: block;
width: 100%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
font-size: 16px;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form action="login.php" method="post">
<h2>学生管理系统 - 登录</h2>
<label for="username">用户名:</label>
<input type="text" name="username" id="username" required>
<label for="password">密码:</label>
<input type="password" name="password" id="password" required>
<input type="submit" value="登录">
</form>
</body>
</html>
```
上面的代码使用 HTML 和 CSS 创建了一个简单的登录表单,其中包含用户名和密码两个字段和一个提交按钮。当用户提交表单时,它将使用 POST 方法将数据发送到 `login.php` 页面进行处理。在实际应用中,您需要将此代码与后端逻辑结合使用来验证用户凭据并执行必要的操作。