Sometimes we need to identify which is the current URL of JSP page to perform some functionality. We can do this very easily by adding the below line in you on load function:
$(function(){
var url = window.location.href;
console.log("Current Url = " + url); // this will print current URL of you page
});
0 Comment(s)