1 Star 1 Fork 0

始梦少年/科讯音乐PC网页版

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
login.html 3.38 KB
一键复制 编辑 原始数据 按行查看 历史
始梦少年 提交于 2020-03-14 17:08 . uas8dgas
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>科讯Muisc-登录</title>
<link rel="stylesheet" href="css/bootstrap.css" />
<style>
body {
overflow: hidden;
}
.bg {
background-image: url(img/timg.jpg);
background-repeat: no-repeat;
background-size: 100% 130%;
position: absolute;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
filter: blur(20px);
}
.login {
height: 400px;
width: 600px;
border-radius: 8px;
background-color: rgba(255, 255, 255, 0.3);
position: fixed;
margin: auto;
left: 30%;
top: 10%;
/*box-shadow: 0 0 10px 1px #E3E3E3 inset;*/
}
.title {
height: 100px;
line-height: 100px;
text-align: center;
color: white;
}
.input {
height: 50px;
width: 500px;
border: 1px solid white;
border-radius: 50px;
margin: auto;
margin-bottom: 40px;
}
.submit {
height: 40px;
width: 300px;
background-color: royalblue;
line-height: 40px;
border-radius: 50px;
text-align: center;
color: white;
margin: auto;
cursor: pointer;
}
.submit:hover {
opacity: 0.9;
}
.ico {
height: 100%;
width: 50px;
line-height: 50px;
text-align: center;
color: white;
font-size: 20px;
float: left;
}
.input-in {
height: 100%;
width: 420px;
float: left;
}
.input-in input {
border: none;
background: transparent;
width: 100%;
height: 100%;
color: white;
}
</style>
</head>
<body>
<div class="bg">
</div>
<div class="login">
<form>
<h3 class="title">用户登录</h3>
<div class="input">
<div class="ico glyphicon glyphicon-user"></div>
<div class="input-in">
<input type="text" maxlength="16" placeholder="输入用户名" id="mgName" />
</div>
<span style="color:white; margin-left: 30px;" id="mgNameError"></span>
</div>
<div class="input">
<div class="ico glyphicon glyphicon-lock"></div>
<div class="input-in">
<input type="password" maxlength="16" placeholder="输入密码" id="mgPassword" />
</div>
<span style="color:white; margin-left: 30px;" id="mgPasswordError"></span>
<p style="text-align: right;"><a style="color: white;" href="reg.html">没有账号,去注册</a></p>
</div>
<div class="submit" id="submit">登录</div>
</form>
</div>
</body>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/config.js" ></script>
<script>
$("#submit").click(function() {
var userName = $("#mgName").val().trim();
var password = $("#mgPassword").val().trim();
if(userName.length <= 0) {
$("#mgNameError").text("用户名不能为空");
return;
} else {
$("#mgNameError").text("");
}
if(password.length <= 0) {
$("#mgPasswordError").text("密码不能为空");
return;
} else {
$("#mgPasswordError").text("");
}
$.post(serverLocation+"/kexunMusic/userLogin", {
"uName": userName,
"uPassword": password
}, function(data) {
if(data.message == "ok") {
var userInfo = JSON.stringify(data.userInfo)
window.localStorage.setItem("userInfo", userInfo);
window.location.href = "index.html";
} else {
$("#mgPasswordError").text("账号或密码错误");
}
});
});
</script>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/gdianqimeng/music-web.git
git@gitee.com:gdianqimeng/music-web.git
gdianqimeng
music-web
科讯音乐PC网页版
master

搜索帮助