Is there a way I can split the query part of an input field into variables and it's associated value into new input fields?
Let's say I have an input field like:
<input type="text" name="sUrl" value="http://site.com/index.php?var1=1&var2=1&var3=foo" />
What I'm trying to achieve is that jQuery turns the query into:
<input type="text" name="var1" value="1" />
<input type="text" name="var2" value="1" />
<input type="text" name="var3" value="foo" />
In PHP I could do an explode on the query part but sadly php!=jquery, what would be the best way to get this done?
Thanks in advance.