"global" variables are really members of the default object (window).
So, outside of a function, the following 3 statements are equivalent:
x=1
var x=1
window.x=1
and inside of a function, the following 2 statements are equivalent:
x=1
window.x=1
You can initialize and access those "global" variables from separate script
blocks, wherever window is available in fact.
Hope this helps
"chirs" <ym*@kicon.com> a écrit dans le message de
news:4c**************************@posting.google.c om...
Hi,
If I have a global variable in one <SCRIPT>...</script>, is it
available in the 2nd <SCRIPT>...</script>. I do not know if "global"
means the whole document or the whole <SCRIPT>...</script> only.
Chris