HDTuto.com

Open URL in New Window using Jquery Example



In this tute, we will discuss open url in new window using jquery. let’s discuss about jquery open link in new window not tab. This article will give you simple example of jquery open link in new window example. We will look at example of open link in new window jquery. Let's get started with open url in new window jquery.

I written full example that will help you how to one new window like new chrome browser, firefox etc on click event. so let's see bellow example:

You can see bellow syntax for window.open().

Syntax:

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

Use:

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

You can see bellow full example so you will be understand how it works:

Example:

<!DOCTYPE html>

<html>

<head>

<title>Jquery Open Link in New Window Example - ItSolutionStuff.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.itsolutionstuff.com", "mywindow", "status=1,toolbar=1");

})

</script>

</body>

</html>

I hope it can help you...




February 23, 2020 | Category : JQuery
Related Posts



Blog Search


Copyright © 2020 HDTuto.com. All rights reserved.