javascript read url path with # code example Example: javascript get url path window.location.pathname