0

I want to make a website page, say the domain like this http://www.test.com. In this web, i have page http://www.test.com/page1.html?bounce=http://www.test.com/page2.html.

I want to make button link in the /page1.html which linked to /page2.html using javascript? How i can do that using url parameters info like this

http://www.test.com/page1.html?bounce=http://www.test.com/page2.html

1 Answers1

0

The syntax to navigate to a new page in JS is:

window.location.href = 'http://www.test.com/page2.html';

However, if you need to gain access to GET parameters within a browser's URL using pure JS, that's something else entirely. See How to get the value from the GET parameters? for a detailed solution.

Community
  • 1
  • 1
DevBW
  • 117
  • 1
  • 7