代码如下所示:
<script>
function password() {undefined
var testV = 1;
var mm = prompt('请输入密码','');
while (testV < 300) {undefined
if (!mm)
history.go(-1);
if (mm == "666666") {//初始密码
break;
}
testV+=1;
var mm =
prompt('密码错误!请重新输入:');
}
if (mm!="password" & testV ==3)
history.go(-1);
return " ";
}
document.write(password());
</script>