页面使用密码保护代码

(编辑:jimmy 日期: 2024/10/13 浏览:2)

代码如下所示:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>密码保护相应页面</title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
function password() {
var testV = 1;
var pass1 = prompt('请输入密码(密码是shenlong):','');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1 == "shenlong") {
alert('密码正确!');
break;
}
testV+=1;
var pass1 =
prompt('密码错误!请重新输入:');
}
if (pass1!="password" & testV ==3)
history.go(-1);
return " ";
}
document.write(password());
</SCRIPT>
</body>
</html>

一句话新闻
Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。