Open a URL in a new tab using JavaScript

Opening a URL in new tab using JavaScript, below snippet will do the trick

You could do it this way calling a direct function, or by adding an event listener to your DOM object.

 

Editorial Staff
 

Editorial Staff at tutsplanet is a dedicated team to write various tutorial articles.