re: Easy way to get parameters from a URL VIEW POST

FULL DISCUSSION
 

Nice! Didn't know about that.

Previously I would split the url at the ? and then split the second array element (the string containing the query string) at each & (if it existed) and then split each new array element at the = to get the parameter list.

Of course I also found that on Stack Overflow a while ago. I definitely didn't invent that one.

 

Ya I used to do the same thing until I fell on this trick from... Stack Overflow haha

From there I went to MDN to understand the API more. Hopefully it gets support from IE at some point

code of conduct - report abuse