猫史档案馆


【密码网页怎么做】

用户:可靠的蓝甲虫sDuG可靠的蓝甲虫sDuG查看:0 回复:0 评论:0 创建时间:2020-11-15T07:47:04


代码:

<!DOCTYPE html>
<html>
<head>
<title>密码</title>
<style>
body {
background-color: lightblue;
padding: 30px;
}
</style>
<script>
function checkPassword() {
var password = document.getElementById("passwordBox");
var passwordEntered = password.value;
if(passwordEntered == "Ernest300") {
return true;
}
alert("密码错误,拒绝访问!");
return false;
}
</script>
</head>
<body>
<p style = "font-size: 30pt;">发现芒克钻石</p>
<p>请输入密码后浏览该网站。</p>
<p>密码:<input id = "passwordBox" type = "password"/></p>
<a href = "发现芒克钻石.html" onclick = "return checkPassword();">
点击此处提交密码,即可浏览网站
</a>
</body>
</html>


回复

上一页1 页 / 共 0下一页