Im developing a Javascript-only app. I have an html page from which I want to load a second html page, passing some parameters to it. In the second page, I want to access these parameters.
Javascript in page1.html:
var url = "page2.html?foo=bar";
jQuery("body").load(url);
This loads page2.html, but how can I access the foo parameter in page2.html?