Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript: redirect to a page?

Tags:

javascript

how do i use jquery [javascript] to goto another page?

or change the url in the browser urlfield and hit enter?

like image 886
never_had_a_name Avatar asked Dec 06 '09 04:12

never_had_a_name


2 Answers

nothing to do with jQuery, just this:

window.location.href = 'whatever.html';
like image 182
nickf Avatar answered Oct 04 '22 12:10

nickf


(Plain old javascript)

window.location = 'http://another-place.com';
like image 31
gahooa Avatar answered Oct 04 '22 12:10

gahooa