parsing - Use javascript to parse URL (not querystring) folder structure domain/parseThis/ -


I know how to parse the query string but I'm sending a format of: domainName / variable / somethingElseIDontCareAbout

I need to catch that middle part and so I can see what it says ... any help?

Thank you! Todd

If your original URL is something like http://domainname.com/variable/ Else , you can use it:

  document.location.href.split ("/") [3]   

if No, just change the number in the brackets.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -