Is there a way to retrieve all Javascript variables within a page?
For example, Firebug can view all of the JS vars, so I know it's possible, but I'm unsure on how to do it.
To get global variables:
var x=[];
for (var i in window){
x.push(i)
};
alert(x.join("\\"));
They are stored in window object
you can see more info here:
http://seanmonstar.com/post/708979238/iterating-global-variables-in-internet-explorer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With