标签:
var a = 1; b = 2; function show() { alert(‘a :‘ + a); //undefined alert(‘b :‘ + b); //2 var a = 3; b = 4; alert(‘a :‘ + a); //3 } show(); alert(‘a- :‘ + a); //1 alert(‘b- :‘ + b); //4
变量的作用域
原文地址:http://www.cnblogs.com/leejersey/p/4235035.html