detect url parameter location pathname code example Example: javascript get url path window.location.pathname