forum

Home / DeveloperSection / Forums / JavaScript - Get Portion of URL Path

JavaScript - Get Portion of URL Path

Royce Roy309112-Mar-2013

Hi Everyone!

What is the correct way to pull out just the path from a URL using JavaScript?

Example:
I have URL
http://www.somedomain.com/account/search?filter=a#top
but I would just like to get this portion
/account/search

I am using jQuery if there is anything there that can be leveraged.

Thanks in advance


Updated on 12-Mar-2013

Can you answer this question?


Answer

1 Answers

Liked By