get current page name from url javascript code example
Example: check the doc name in javascript
var path = window.location.pathname;
var page = path.split("/").pop();
console.log( page );
var path = window.location.pathname;
var page = path.split("/").pop();
console.log( page );