Window
is the main JavaScript object root, aka the global object
in a browser, also can be treated as the root of the document object model.
(Window
是主要的JavaScript对象根,也就是浏览器中的global object
,也可以视为文档对象模型的根。)
You can access it as window
(您可以将其作为window
访问)
window.screen
or just screen
is a small information object about physical screen dimensions.
(window.screen
或just screen
是一个关于物理屏幕尺寸的小信息对象。)
window.document
or just document
is the main object of the visible (or better yet: rendered) document object model/DOM.
(window.document
或just document
是可见(或更好的:渲染)文档对象模型/ DOM的主要对象。)
Since window
is the global object you can reference any properties of it with just the property name - so you do not have to write down window.
(由于window
是全局对象,因此您可以仅使用属性名称来引用它的任何属性 - 因此您不必记下window.
)
- it will be figured out by the runtime.( - 它将由运行时计算出来。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…