Web DevelopmentJquery – Redirecting a user to a page

Jquery – Redirecting a user to a page

Inside Jquery use the below code

window.location.replace(URL);

Example to go a page roles I would use window.location.replace(“/admin/JAS/JAScripts/roles”);

Get the URL of the Current page

$(document).ready(function() {
    var pathname = window.location.pathname;
});

Categories: Web Development

Comments

No Comments Yet. Be the first?

Post a comment

Your email address will not be published. Required fields are marked *