Here are the answers to open the page in the same browser window / tab.
However, I wanted the page to open in a new window / tab when they click the button. (tab / window depends on the user's browser settings)
So here is how it works: open the page in a new tab / window :
<button type="button" onclick="window.open('http://www.example.com/', '_blank');">View Example Page</button>
This is not a required button; you can use it anywhere. Pay attention to _blank , which is used to open in a new tab / window.
Tarik Mar 27 '17 at 3:03 on 2017-03-27 03:03
source share