![javascript - How does one prevent the opening of a new tab or window when hyperlink behavior was created virtually by e.g. an HTML button's "click" event handling? - Stack Overflow javascript - How does one prevent the opening of a new tab or window when hyperlink behavior was created virtually by e.g. an HTML button's "click" event handling? - Stack Overflow](https://i.stack.imgur.com/8oG5w.png)
javascript - How does one prevent the opening of a new tab or window when hyperlink behavior was created virtually by e.g. an HTML button's "click" event handling? - Stack Overflow
![Let say i have an html file contain a button that's gonna run this function, how do i make that function open the link in new tab without changing the function it Let say i have an html file contain a button that's gonna run this function, how do i make that function open the link in new tab without changing the function it](https://preview.redd.it/pg8p61qnrgl71.png?auto=webp&s=3f22a8a325304f3a9a51b2fd613c888269001746)
Let say i have an html file contain a button that's gonna run this function, how do i make that function open the link in new tab without changing the function it
![Open a Link in a new tab on Button click in JavaScript | JavaScript button onclick new page - YouTube Open a Link in a new tab on Button click in JavaScript | JavaScript button onclick new page - YouTube](https://i.ytimg.com/vi/MUL40B0mAzA/hqdefault.jpg)
Open a Link in a new tab on Button click in JavaScript | JavaScript button onclick new page - YouTube
![javascript - need to open link in new tab of browser without leaving the current tab - Stack Overflow javascript - need to open link in new tab of browser without leaving the current tab - Stack Overflow](https://i.stack.imgur.com/wnnku.png)
javascript - need to open link in new tab of browser without leaving the current tab - Stack Overflow
![html - Have right-click browser menu of open link in new tab with knockout click binding - Stack Overflow html - Have right-click browser menu of open link in new tab with knockout click binding - Stack Overflow](https://i.stack.imgur.com/O3Ks6.png)