how to open current url in new window using javascript code example Example: open link in new tab javascript window.open('https://www.codexworld.com', '_blank');