I have a page /a that has a line var aaa = 99;
And I load that page /a into a div on another page. In the other page, I want access to that variable aaa. I tried this: $("#adiv").load("/a", function () { console.log(aaa); }) I get an error that aaa is undefined. What am I doing wrong?