最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
输入正确进入密码保护页
时间:2022-06-30 09:18:17 编辑:袖梨 来源:一聚教程网
把如下代码加入区域中:
T LANGUAGE="JavaScript">
function password() {
var testV = 1;
var pass1 = prompt('请输入密码(密码是welcome):','');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1 == "welcome") {
alert('密码正确!');
break;
}
testV+=1;
var pass1 =
prompt('密码错误!请重新输入:');
}
if (pass1!="password" & testV ==3) history.go(-1);
return " ";
} document.write(password());
function password() {
var testV = 1;
var pass1 = prompt('请输入密码(密码是welcome):','');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1 == "welcome") {
alert('密码正确!');
break;
}
testV+=1;
var pass1 =
prompt('密码错误!请重新输入:');
}
if (pass1!="password" & testV ==3) history.go(-1);
return " ";
} document.write(password());
相关文章
- 《潜水员戴夫》圆翅燕鱼抓捕怎样 06-16
- 为什么稳定币需要隐私?市值越大恶梦越多 06-16
- 《咏月风雅》翩然技能属性具体介绍 06-16
- 《零之战线》尼古拉一世约会位置怎么找 06-16
- 《这城有良田》仓廪有实有哪些玩法 06-16
- 《元梦之星》枪械瞄准哪些方法效果更好 06-16