I want to extract following values from the url mentioned below?
- layout2
- aqua
code:
var url = "http://localhost:8080/dflyers/edit.html?layout2&aqua"
var dataLayout = // I need url string (layout2) here
var dataTheme = // I need url string (aqua) here
Can some one help to get mentioned values using jQuery/Javascript? Thanks
Well, if you just want to get those values from the mentioned url, and not any complex url parser, the most simple solution is:
Example running in jsfiddle