Chrome Extension

open link in new tab using javascript'', '_blank');
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now

If you want to open a link in a new tab using javascript only you can use javascript method which will open link in a new tab if you pass the second parameter as '_blank' in method.

This is equivalent to appying target="_blank" to <a> tag to open link directly using HTML.

Search Index Data (The code snippet can also be found with below search text)

window.location.href with target _blank in javascript
Was this helpful?
Open Code Manager We are hiring