“Redirection JavaScript” Réponses codées

rediriger 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

Redirection JS

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

Redirection JavaScript

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

Redirection JavaScript

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

rediriger avec javascript

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

Redirection JavaScript

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

Réponses similaires à “Redirection JavaScript”

Questions similaires à “Redirection JavaScript”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code