How to Open URL in New Window using jQuery?

Today, We want to share with you How to Open URL in New Window using jQuery?.In this post we will show you How to open a URL in a new Tab using JavaScript or jQuery?, hear for JavaScript to open link in new window without being popup blocked we will give you demo and example for implement.In this post, we will learn about How to Open External Links in a New Window or Tab with JavaScript or jQuery? with an example.

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

How to Open URL in New Window using jQuery?

There are the Following The simple About jquery open new window with content Full Information With Example and source code.

As I will cover this Post with live Working example to develop javascript open popup window, so the jQuery Open All Hyperlinks in New Window is used for this example is following below.

Jquery Open Link in New Window Example

Syntax:

window.open(URL, name, specs, replace)

using jQuery
window.open("https://www.google.com", "mywindow", "status=1,toolbar=1");

Open External Links In New Window

index.html

<!DOCTYPE html>
<html>
<head>
    <title>Simple Jquery Open Link in New Window Example - google.com</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
  
<button class="btn2">Click Me</button>
  
<script type="text/javascript">
    $(".btn2").click(function(){
        window.open("https://www.google.com", "mywindow", "status=1,toolbar=1");
    })
</script>
   
</body>

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about How can I open a link in a new window?.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1.   react open link in new tab
  2.   Latest Top 10 jQuery Interview Questions and Answers
  3.   Laravel Passing Multiple Variables from Controller to View
  4.   Simple Laravel 5 Vue JS Ajax CRUD(insert update delete)
  5.   JavaScript Access PHP variables in jQuery
  6.   Vue Toggle Switch Component ON-OFF
  7.   How to Open URL in New Tab using JavaScript
  8.   Laravel 5.7 Get Current User Details using Controller and blade
  9.   Redirect from one website url to another url
  10.   Laravel 6 Eloquent Has With and WhereHas