In javascript, how can I get the relative path of the current url?
for example http://www.example.com/test/this?page=2
http://www.example.com/test/this?page=2
I want just the /te
/te
location.href
holds the url of the page your script is running in.