go page 2 javascript code example Example 1: js go to page Click to copywindow.location.href = "http://example.com/new_url"; Example 2: js go back Click to copyhistory.back()