作用域分为Global Scope, Local Scope.
with,catch will affect the Scope link.
global scope variable is one attribute of window.
a var without define will be treated as a global variable.
[quote] function getA(){ name="ddd"; } alert(window.name);// [/quote]
"ddd" will popup.
with,catch will affect the Scope link.
global scope variable is one attribute of window.
a var without define will be treated as a global variable.
[quote] function getA(){ name="ddd"; } alert(window.name);// [/quote]
"ddd" will popup.