ItSolutionStuff.com

How to Redirect Another Web Page in JQuery?

By Hardik Savani February 5, 2023
Javascript jQuery

Hello Dev,

Today, I would like to show you redirect page in javascript. I would like to share with you redirect page using jquery. If you have a question about onclick redirect to another page using jquery then I will give a simple example with a solution. We will use jquery redirect page example. Let's see below example jquery redirect url with parameter.

You can redirect page or url in your js file. when you require to redirect page form jquery then you can use window.location.href. window.location.href through you can redirect url using jquery/javascript. So, Let's see following example:

Example 1:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title></title>

</head>

<body>

<script type="text/javascript">

window.location.href = "https://www.itsolutionstuff.com";

</script>

</body>

</html>

Example 2:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title></title>

</head>

<body>

<script type="text/javascript">

window.location.replace("https://www.itsolutionstuff.com");

</script>

</body>

</html>

I hope it can help you...

Tags: jQuery
Hardik Savani

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube