You can use following function to retrieve the current page name from the URL.
function getCurentFileName() {
var pagePathName = window.location.pathname;
return pagePathName.substring(pagePathName.lastIndexOf("/") + 1);
}
Subscribe to:
Post Comments (Atom)
No comments:
Write comments