Topics
Introduction
In this article I am going to tell you how to redirect a user from one webpage to another webpage using Jquery or Javascript. For this excercise, you can use any javascript editor
There are lots of ways to redirect a user from one web page to other web page.
By using window.location
window.location.href = ‘https://techstudys.com’
document.location.href = ‘/path-of-the-webpage’
window.location.replace(‘https://techstudys.com’)
window.location.assign(‘https://techstudys.com’)
By using jQuery
$(location).attr(‘href’,’https://techstudys.com’)
$(window).attr(‘location’,’https://techstudys.com’)
$(location).prop(‘href’, ‘https://techstudys.com’)