javascript redirect to url
snippet in javascript

javascript redirect to url

user8826

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

javascript redirect

user9799

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

javascript redirect to url

user6233

// 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";

javascript redirect page

user5783

// Simulate a mouse click:
window.location.href = "http://www.w3schools.com";

// Simulate an HTTP redirect:
window.location.replace("http://www.w3schools.com");

redirect javascript url

user5928


  // Simulate 
  a mouse click:
window.location.href = "http://www.w3schools.com";

  
// Simulate an HTTP redirect:
window.location.replace("http://www.w3schools.com");

 

redirect with javascript

user9891

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