How to Redirect Another Web Page in 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...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- JQuery Remove All Numbers from String Example
- JQuery Bootbox Modal Dialog Prompt Example
- How to Add CKEditor Required Field Validation in JQuery?
- Preview an image before Upload using jQuery Example
- How to Get Attribute Value in JQuery?
- How to Check If Element is Exists or Not in jQuery?
- Display Loading Image when AJAX Call is in Progress Example
- How to Remove undefined Value from Array in JQuery?
- How to access PHP variables in JQuery?
- How to Allow Only One Checkbox Checked at a Time in JQuery?
- How to Check Undefined, Empty and Null in JQuery?
- How to Check Object is Empty or Not in JQuery?