Category Archives: js javascript

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 );}

Posted in js javascript | 1 Comment