In Javascript, we can use window.open() to open a new browser window or tab.
But if a tab is already open, it should highlight that only. It should not open duplicate tabs.
How to do that?
In Javascript, we can use window.open() to open a new browser window or tab.
Share
The second argument of
window.open(strUrl, strWindowName[, strWindowFeatures]);is the window name. if you specify that parameter, to anything other than “_blank” it will refer to the already opened tab/window.For instance:
and
will open the page in an already opened window/tab.