javascript get url without domain code example Example: javascript get url path window.location.pathname