Get Current Page Name Using JavaScript
Quick function to return only the current page name, using JavaScript:
function CurrentPageName() {
return document.location.href.substring(
document.location.href.length
, document.location.href.lastIndexOf('/') + 1
);
}
Labels: js javascript
1 Comments:
Hi,
Thanks for the info.
Post a Comment
Subscribe to Post Comments [Atom]
<< Home