How to Open URL in New Tab using jquery

How to Open URL in New Tab using jquery

redirect to link using jquery on new tab
HTML <a> target attribute provides a simple and easy way to open linked URLs in a new browser window or tab. You must use the _blank value in the target attribute to open the linked URL in a new tab or window.

Example in html

<a href="https://www.vkprogramming.com" target="_blank">Visit Vkprogramming</a>

 

If you want to open URL with jquery, the open() method of Window interface is the best option. The jquery window.open() method opens a new browser window. Use _blank in the second parameter of window.open() method to open a URL in a new tab using jquery.

If you want to open URLs with jquery, the open() method of the window interface is the best option. The jquery window.open() method opens a new browser window. To open the URL in a new tab using jquery, use _blank in the second parameter of the window.open() method.

The following JavaScript code will open https://www.vkprogramming.com in a new browser tab or window.

Example in jquery

window.open("https://www.vkprogramming.com", "_blank");

Scroll to Top