javascript location search for multiple query params in url

Viewed 1440

For a url such as

http://example.com/x1/x2?qp1a=val1&qp1b=val2#/y1/y2?qp2a=val1b&qp2b=val2b

location.pathname = x1/x2 and location.search = ?qp1a=val1&qp1b=val2

how to get y1/y2 and ?qp2a=val1b&qp2b=val2b USING window.location

Note: I know to solve this using reg ex and other ways, i am more interested in knowing how to get these values using window.location

1 Answers
Related