in

How to open a URL in a new tab (and not a new window) using JavaScript?

Ghana's No. 1 Premier Resource For News, Politics, Sports, Business, Entertainment, Showbiz ,Photos, Music, Videos & Movies.

become a member

How to open a URL in a new tab (and not a new window) using JavaScript? javascript trick

Download Latest Movies in Single Click For All Devices in 720p and 1080p.Download Movies

Opening of a URL in a new tab depends on the browser and the user’s browser preferences. There is nothing you can do in code to force open a link strictly in a new tab.

However if you want the user to open it in either new tab or window(depending on their preferences) you can add the following attribute to the anchor() tag −

target="_blank"

This will instruct the browser to leave the current page as is and open the link in a new tab/window.

Thank you for reading; when you read and give feedback, we get one more chance to write one more story and don't forget to Share on favorite Social media network.

youtube follow ustwitter follow us

What do you think?

Written by bawaeric

Download Mp4 The Plan (2019) [Spanish]

The Stand In (2020) Full Movie Download