“Pengalihan Javascript” Kode Jawaban

Redirect JavaScript

// similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");

// similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";
FloatDev

JS Redirect

window.location.href = "/"; // appears on history
window.location.replace("/"); // does not appear on history
Code Cat

Javascript Redirect

<script>
  window.location.href = "http://mywebsite.com/home.html";
</script>
Bored Beaver

Javascript Redirect

window.location.href = "http://mywebsite.com/home.html";
Grepper

Redirect dengan JavaScript

window.location.replace('http://mywebsite.com/home.html');
Spyder

Pengalihan Javascript

<html>
  <head>
    <script type="text/javascript">
      function RedirectionJavascript(){
        document.location.href="http://manouvellepage.com";
      }
   </script>
  </head>
  <body onLoad="setTimeout('RedirectionJavascript()', 2000)">
     <div>Dans 2 secondes vous allez être redirigé vers http://manouvellepage.com</div>
  </body>
</html>
Vast Vendace

Jawaban yang mirip dengan “Pengalihan Javascript”

Pertanyaan yang mirip dengan “Pengalihan Javascript”

Lebih banyak jawaban terkait untuk “Pengalihan Javascript” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya