New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[js] 第42天 window对象和document对象有什么区别? #157
Comments
window是全局对象, 类似于global, 没什么特别的, 就类似于地球, 大家都住在地球上 |
window对象代表浏览器中的一个打开的窗口或者框架,window对象会在或者每次出现时被自动创建,在客户端JavaScript中,Window对象是全局对象global,所有的表达式都在当前的环境中计算,要引用当前的窗口不需要特殊的语法,可以把那个窗口属性作为全局变量使用,例如:可以只写 document对象代表整个HTML文档,可以用来访问页面中的所有元素 。 |
Window是浏览器的对象可以称为宿主对象。宿主对象包括(Bom,setTimeout,storage,work Server等 ) |
window是浏览器对象 全局对象 例如在nodejs环境里就是Global document是文档对象 浏览器中专属的对象 |
#110 DOM和BOM有什么区别? |
document对象是window对象的一部分 |
window是浏览器全局对象,document是window的一部分,在nodejs环境中全局对象就是global. |
window是浏览器对象 全局对象 例如在nodejs环境里就是Global document是文档对象 浏览器中专属的对象 |
Window是浏览器的对象可以称为宿主对象。宿主对象包括(Bom,setTimeout,storage,work Server等 ) |
window是浏览器全局对象,document也是window的一部分,但是不必写成window.document,可以直接缩写成document. 。 |
window对象和document对象是JavaScript中两个重要的全局对象,它们有一些区别和不同的作用。
简而言之,window对象是浏览器窗口的全局对象,提供了浏览器窗口的控制和交互方法,而document对象是当前页面的文档对象模型,提供了对页面内容的访问和操作的方法。两者在JavaScript中扮演不同的角色,但它们之间密切相关,可以相互操作和影响。 |
第42天 window对象和document对象有什么区别?
The text was updated successfully, but these errors were encountered: