<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
h1{
text-align: center;
}
</style>
</head>
<body>
<script>
let name = prompt('请输入用户名')
let add = +prompt('请输入密码(纯数字)')
while(name!=='坤坤好帅'&&add!==666666){
alert('用户名或者密码不正确,请重新输入')
name = prompt('请输入用户名')
add = +prompt('请输入密码(纯数字)')
}
alert('登录成功!')
document.write(`<h1>欢迎来到快乐星球!!</h1>`)
</script>
</body>
</html>
无脑登录--案例
最新推荐文章于 2024-04-23 23:38:25 发布