first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>用户登录</title>
</head>
<body>
<div class="login">
<input class="username" type="text" placeholder="请输入用户名"> <br>
<input class="userpwd" type="password" placeholder="请输入密码"> <span>显示/隐藏</span> <br>
<button>登 录</button>
</div>
<script>
var showstatus = true;
document.querySelector("button").onclick = function () {
var username = document.querySelector(".username").value;
var userpwd = document.querySelector(".userpwd").value;
if (username == "2271608011" && userpwd == '123456') {
alert("login success")
}else {
alert("login error")
}
}
document.querySelector("span").onclick = function () {
if(showstatus){
//console.log("显示密码");
(document.querySelector(".userpwd")).setAttribute("type","text");
showstatus = false
}else {
//console.log("隐藏密码");
(document.querySelector(".userpwd")).setAttribute("type","password");
showstatus = true
}
}
</script>
</body>
</html>