javascript parse window.location.href code example Example: javascript get url path window.location.pathname