<html>
<head>
<meta charset='utf-8'>
<title>while</title>
<script>
var pwd=prompt('请输入您的密码:','');
while(pwd!=='123456'){
pwd=prompt('密码输入错误,请重新输入:','')
}if(pwd=='123456'){
document.write('登录成功!')
}
</script>
</head>
<body>
</body>
</html>
27 while循环语句
最新推荐文章于 2022-05-21 20:59:55 发布