简体   繁体   中英

404 error appearing when all links work and working in other file

My code is not working in one file named vex6.html I have

<!DOCTYPE html>
<div id="body"></div>
<html style="font-size: 16px;" lang="en"><head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script class="u-script" type="text/javascript" src="../../js/fullscreen.js" defer=""></script>
    <script class="u-script" type="text/javascript" src="../../js/script.js" defer=""></script>
    <link href="../../style.css" rel="stylesheet" type="text/css" />
    <meta charset="utf-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>Vex 6</title>

  <style>
    body {
    background-color: #000000;
}
  </style>
  
  <button class="button fullscreenbutton">Full Screen</button>
  <iframe src="about:blank" id="vex6" width="100%" height="100%" style="border:0px solid black;"></iframe>

<script>
 var x=localStorage.getItem("vex6");
 document.getElementById("vex6").src = x
 localStorage.setItem("game",x);
</script>
        </div>
      </div>
    </section>

  
</body>
  <script src="../../js/disable.js" defer></script>

</html>

and in vex5.html I have

<!DOCTYPE html>
<div id="body"></div>
<html style="font-size: 16px;" lang="en"><head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script class="u-script" type="text/javascript" src="../../js/fullscreen.js" defer=""></script>
    <script class="u-script" type="text/javascript" src="../../js/script.js" defer=""></script>
    <link href="../../style.css" rel="stylesheet" type="text/css" />
    <meta charset="utf-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>Vex 5</title>

  <style>
    body {
    background-color: #000000;
}
  </style>
  
  <button class="button fullscreenbutton">Full Screen</button>
  <iframe src="about:blank" id="vex5" width="100%" height="100%" style="border:0px solid black;"></iframe>

<script>
 var x=localStorage.getItem("vex5");
 document.getElementById("vex5").src = x
 localStorage.setItem("game",x);
</script>
        </div>
      </div>
    </section>

  
</body>
  <script src="../../js/disable.js" defer></script>

</html>

and in files.js I have

localStorage.setItem("vex6", "https://obviousplays.tk/Gfiles6/vex6/");
localStorage.setItem("vex5", "https://obviousplays.tk/gfiles/vex5/");
localStorage.setItem("vex4", "https://obviousplays.tk/gfiles/vex4/");
localStorage.setItem("vex3", "https://obviousplays.tk/gfiles/vex3/");

vex6 is showing the iframe and the button works but it does not in vex5 and I have no idea why. It seems like its not able to find the vex5 link. I think it has no idea where the vex5 link is but i did the samething with vex6 and it worked purfictly

Thanks for the help Phil I was not running my js file all I needed to do is add window.onload = function(){ to files.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM