get url filename javascript code example
Example 1: javascript get url path
window.location.pathname
Example 2: get filename from url js
var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1);
window.location.pathname
var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1);