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
Try
window.location.pathname+window.location.search