Q:

How to switch one page to another page using js?

I want to know that how i call/switch one page to another page using javascript.
I am trying to creating a Game.
in which 2 slides. 
First Slides is for game overview in which there is a 
when i click on play button it should redirect me to second page. 
i want to know how it will work in JavaScript.Can't use html.
Here is my game link which i want to create.
https://www.screencast.com/t/qmbzE9nWei2c
Please watch this link and understand how it work and help me give me some tips.
Thanks

A:

You can do this by simply adding an onclick event to the button:
<button onclick="location.href='www.example.com';"> Play </button>

