在javaScript中變量使用var聲明的變量是當前做用域的變量,不使用var聲明的則確定是全局變量。java
http://msdn.microsoft.com/zh-cn/library/dn645450.aspxip