ho questo:ottenere il percorso e la stringa di query da URL utilizzando JavaScript
http://127.0.0.1:8000/found-locations/?state=--&km=km
voglio che questo:
found-locations/?state=--&km=km
come faccio a fare questo in javascript?
ho cercato window.location.href
ma mi sta dando tutta l'url
ho provato window.location.pathname.substr(1)
ma mi sta dando found-locations/
Vedere questa domanda: http://stackoverflow.com/questions/441755/ regular-expression-to-remove-hostname-and-port-from-url – thebreiflabb