JavaScript - Redirect

Aus Laub-Home.de Wiki
Zur Navigation springen Zur Suche springen
// simulates similar behavior as an HTTP redirect
window.location.replace("http://foobar");

// simulates similar behavior as clicking on a link
window.location.href = "http://foobar";

// in jQuery
$(location).attr('href', 'http://foobar');