Ai
1 Star 0 Fork 0

Yan Honghao/Tomcat-MyBatis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 2.61 KB
一键复制 编辑 原始数据 按行查看 历史
Yan Honghao 提交于 2021-11-23 00:03 +08:00 . 上传工程文件
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>index.html</title>
<style>
body {
background-color: whitesmoke;
}
div {
text-align: center;
}
.entrance {
text-decoration: none;
font-size: large;
font-weight: bold;
margin-left: 50px;
margin-right: 50px;
}
.entrance:link, .entrance:visited {
/*color: forestgreen;*/
border-radius: 5px;
background-color: tomato;
color: white;
padding: 12px 18px;
text-align: center;
text-decoration: none;
display: inline-block;
}
#visitor:hover, #visitor:active {
background-color: red;
}
#admin:hover, #admin:active {
background-color: green;
}
#speech:hover, #speech:active {
background-color: blue;
}
</style>
</head>
<body>
<div style="margin-bottom: 30px">
<h1 style="margin-top: 120px">杭州黑马JavaEE_50期学生管理系统</h1>
<br/>
<a class="entrance" id="visitor" href="query">访客模式</a>
<a class="entrance" id="admin"
onclick="/*alert('&quot;管理模式&quot;暂未开放!');*/ document.getElementById('login').style.display='block'" href="#">管理模式</a>
</div>
<div id="login" style="display: none; width: fit-content; margin: auto; padding: 5px; background-color: white;">
<form action="#" method="POST" autocomplete="off">
<div>
<label>账号:
<input type="text" name="username" id="username"/>
</label>
</div>
<div>
<label>密码:
<input type="password" name="password" id="password"/>
</label>
</div>
<div style="margin-top: 5px">
<button type="submit" onclick="validate()">登录</button>
</div>
</form>
</div>
<div style="margin-top: 30px">
<a class="entrance" id="speech" href="speech.html">今日演讲内容</a>
</div>
<script>
function validate() {
let username = document.getElementById("username").value;
let password = document.getElementById("password").value;
if ((username === "admin") && (password === "123456")) {
alert("登录成功!");
} else {
alert("账号或密码错误!");
}
document.getElementById("password").value = "";
}
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/CyberWorkspace/tomcat-mybatis.git
git@gitee.com:CyberWorkspace/tomcat-mybatis.git
CyberWorkspace
tomcat-mybatis
Tomcat-MyBatis
master

搜索帮助