情景1:



<script type="text/javascript"> 
	 //var name = '高红成';
	 function person(){
		var name = '高伟刚'
		 return function(){
		   alert(name);
		 }
	 }
	 var p = person();
	 p();//"高伟刚"
</script>


 情景2:



<script type="text/javascript"> 
	 var name = '高红成';
	 function person(){
		// var name = '高伟刚'
		 return function(){
		   alert(name);
		 }
	 }
	 var p = person();
	 p();//"高红成"
</script>