We Know That we can redirect to web pages using location.href or location.replace but I wanted to ask that can We open a new webpage in a new tab using JavaScript.
Asked
Active
Viewed 45 times
0
-
1Does this answer your question? [Open a URL in a new tab (and not a new window)](https://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window) – Adesh Kumar Jun 10 '20 at 04:38
-
Does this answer your question? [Open URL in new window with JavaScript](https://stackoverflow.com/questions/14132122/open-url-in-new-window-with-javascript) – Always Helping Jun 10 '20 at 04:41
2 Answers
0
You can do it using window.open(url)
for more details: https://developer.mozilla.org/en-US/docs/Web/API/Window/open

Sahandevs
- 1,120
- 9
- 25