感觉效果是一样的?
没有区别,window是浏览器JS引擎的global对象
window.location === location
true
location就是window对象里的啊...
没有区别 后者在严格模式下会报错
没有区别,window是浏览器JS引擎的global对象