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 = ‘http://www.techstudy.org’
document.location.href = ‘/path-of-the-webpage’
window.location.replace(‘http://www.techstudy.org’)
window.location.assign(‘http://www.techstudy.org’)
By using jQuery
$(location).attr(‘href’,’http://www.techstudy.org’)
$(window).attr(‘location’,’http://www.techstudy.org’)
$(location).prop(‘href’, ‘http://www.techstudy.org’)