HOME
BBS
欢迎您,您可以注册或者登录 密码找回
qq登录 微博登录正在制作中……
我的个人网站 » Log » 插入网页加密码访问页面源代码
阅:9 | 回:0

插入网页加密码访问页面源代码

鱼鱼 发表于 2024-12-23 9:48:34
  •  
职务:管理员
积分:19177
发:45 / 506 登:3336
等级:鱻
最后登录:2025-04-30
<script language="javascript">

    function password() {

      var testV = 1;

      var pass1 = prompt('Input password:', '');

      while (testV < 3) {

        if (pass1 === null) {

          alert('Cancel login');

          window.close(); // Close the window

          return;

        }

        if (pass1 === "host") {

          alert('Password is correct!');

          return;

        }

        testV++;

        pass1 = prompt('Password incorrect! Please re-enter:');

      }

      if (testV === 3) {

        alert('Three input errors!');

        window.close(); // Close the window

      }

    }

    password();

  </script>

以萌养阵,方可长命百岁。


目前不允许游客回复,请 登录 注册 发表言论。