user

Joseph Morgan

22 Dec 2021

How to open URL in new tab & focus on it in Javascript?

Javascript

How can I open URL in new tab & focus on it in Javascript? the url is in the new website, I am using window.open but it's not working as I am expecting 

window.open('//localhost:3000/', '_blank');

Thanks in advanced

 

Comments

Mohamed Atef

22 Dec 2021

Best Answer

best answer
githubgithubgithub

You can try 

 window.open('/company/locations', '_blank').focus();

this should be working as you need, Good luck

© 2024 Copyrights reserved for web-brackets.com