HTML DOM Document defaultView attribute
- 上一页 createTextNode()
- 下一页 designMode
- 返回上一层 HTML DOM Documents
instance
Example 1
get document's window object:
const view = document.defaultView;
Example 2
get window size:
const view = document.defaultView; let width = view.innerWidth; let height = view.innerHeight;
syntax
document.defaultView
return value
type | description |
---|---|
object | document's window object. |
browser support
document.defaultView
ya ce ce DOM Level 1 (1998) teyari.
所有浏览器都支持它:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
支持 | 9-11 | 支持 | 支持 | 支持 | 支持 |
- 上一页 createTextNode()
- 下一页 designMode
- 返回上一层 HTML DOM Documents