不知道为什么表单的method设置了post之后仍然用的是get
请求各位兄弟姐妹们帮忙看看😢
login.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录</title>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>
* {
padding: 0;
margin: 0;
}
html {
height: 100%;
}
body {
font-family: 幼圆, YouYuan;
background-image: linear-gradient(to bottom right, #111111, #292929);
}
.login-container {
width: 600px;
height: 315px;
margin: 0 auto;
margin-top: 10%;
border-radius: 15px;
box-shadow: 0 10px 50px 0px #626262;
background-color: #626262;
}
.left-container {
display: inline-block;
width: 310px;
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
padding: 36px 64px 19px 64px ;
background-image: linear-gradient(to bottom right, #292929, #343434);
}
.title {
color: #e8e8e8;
font-size: 18px;
font-weight: 200;
}
.title span {
border-bottom: 3px solid #08bf62;
padding: 4px;
}
input[type=radio] {
width: 10px;
}
.choice{
padding-top: 15px;
}
.choice span{
font-size: 14px;
color: #e8e8e8;
}
input {
border: 0;
background: none;
outline: none;
color: #e8e8e8;
margin: 15px 0;
width: 100%;
padding: 5px 0;
transition: .2s;
border-bottom: 1px solid #e8e8e8;
}
input:hover {
border-bottom-color: #e8e8e8;
}
::-webkit-input-placeholder {
color: #e8e8e8;
}
.message-container {
padding: 40px 35px 20px 45px;
font-size: 14px;
color: #08bf62;
cursor: pointer;
font-weight: 800;
line-height: 25px;
}
.right-container {
width: 145px;
display: inline-block;
height: calc(100% - 120px);
vertical-align: top;
padding: 60px 0;
}
.regist-container {
text-align: center;
color: #e8e8e8;
font-size: 18px;
font-weight: 200;
}
.regist-container span {
border-bottom: 3px solid #08bf62;
padding: 4px;
}
input[type=submit] {
font-size: 14px;
color: #e8e8e8;
text-align: center;
position: relative;
width: 75px;
border: 1px solid #08bf62;
padding: 10px;
display: inline;
line-height: 20px;
border-radius: 20px;
bottom: 10px;
transition: .2s;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #08bf62;
color: #e8e8e8;
}
</style>
</head>
<body>
<div class="login-container">
<div class="left-container">
<div class="title"><span>登录</span></div>
<form class="input-container" action="" method="post">
<div class="choice">
<input type="radio" name="info" value="admin" placeholder="管理员"></input><span>管理员登录</span>
<input type="radio" name="info" value="user" placeholder="用户"></input><span>普通用户登录</span>
</div>
<input type="text" name="username" placeholder="用户名">
<input type="password" name="password" placeholder="密码">
<input class="action-container" type="submit" value="提交"></input>
</form>
</div>
<div class="right-container">
<div class="regist-container">
<span class="regist">注册</span>
</div>
<div class="message-container">
<span>如果输入的用户名不存在将自动注册新账号:)</span>
</div>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
console.log("ready");
$(".info").each(function(){
$(this).click(function(){
console.log("value = "+$(this).val());
});
});
});
</script>
</html>