console.log(window.l); //undefined console.log(l); //Uncaught ReferenceError: l is not defined js对于未找到的元素返回的结果不一样。 相关文章: