this 区域 实例 测试
<html> <body> <script type="text/javascript"> var oCar = new Object; oCar.color = "red"; function test(){ alert(color +" 1"); //undefined alert(this.color +" 2"); //undefined var color = " green"; alert(color +" 3"); //green alert(this.color+" 4"); //undefined } test(); oCar.showColor = function() { alert(this.color+" 5");}; //red oCar.showColor(); </script> </body> </html>