“JS Redirect Code” 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

Javascript Redirect

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

JS Redirect Code

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

Javascript Redirect

<p onclick="myFunction()"></p>
<script>
function myFunction() {
	  window.location.href = "https://whereyouwouldliketogo.com"
}
</script>
Donald Duck

Jawaban yang mirip dengan “JS Redirect Code”

Pertanyaan yang mirip dengan “JS Redirect Code”

Lebih banyak jawaban terkait untuk “JS Redirect Code” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya