通过以下页面获取window属性值,共400个左右。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>windows属性值 </title> </head> <body> <script> var str = ''; for (var attr in window) { str += attr + ':' + window[attr] + '<br>'; } document.body.innerHTML = str; </script> </body> </html>
结果如下
postMessage:function () { [native code] } blur:function () { [native code] } focus:function () { [native code] } close:function () { [native code] } frames:[object Window] self:[object Window] window:[object Window] parent:[object Window] opener:null top:[object Window] length:0 closed:false location:http://localhost document:[object HTMLDocument] origin:http://localhost:63342 name: history:[object History] locationbar:[object BarProp] menubar:[object BarProp] personalbar:[object BarProp] scrollbars:[object BarProp] statusbar:[object BarProp] toolbar:[object BarProp] status: frameElement:null navigator:[object Navigator] applicationCache:[object ApplicationCache] customElements:[object CustomElementRegistry] external:[object External] screen:[object Screen] innerWidth:730 innerHeight:974 scrollX:0 pageXOffset:0 scrollY:0 pageYOffset:0 screenX:0 screenY:0 outerWidth:1920 outerHeight:1040 devicePixelRatio:1 clientInformation:[object Navigator] screenLeft:0 screenTop:0 defaultStatus: defaultstatus: styleMedia:[object StyleMedia] onanimationend:null onanimationiteration:null onanimationstart:null onsearch:null ontransitionend:null onwebkitanimationend:null onwebkitanimationiteration:null onwebkitanimationstart:null onwebkittransitionend:null isSecureContext:true onabort:null onblur:null oncancel:null oncanplay:null oncanplaythrough:null onchange:null onclick:null onclose:null oncontextmenu:null oncuechange:null ondblclick:null ondrag:null ondragend:null ondragenter:null ondragleave:null ondragover:null ondragstart:null ondrop:null ondurationchange:null onemptied:null onended:null onerror:null onfocus:null oninput:null oninvalid:null onkeydown:null onkeypress:null onkeyup:null onload:null onloadeddata:null onloadedmetadata:null onloadstart:null onmousedown:null onmouseenter:null onmouseleave:null onmousemove:null onmouseout:null onmouseover:null onmouseup:null onmousewheel:null onpause:null onplay:null onplaying:null onprogress:null onratechange:null onreset:null onresize:null onscroll:null onseeked:null onseeking:null onselect:null onstalled:null onsubmit:null onsuspend:null ontimeupdate:null ontoggle:null onvolumechange:null onwaiting:null onwheel:null onauxclick:null ongotpointercapture:null onlostpointercapture:null onpointerdown:null onpointermove:null onpointerup:null onpointercancel:null onpointerover:null onpointerout:null onpointerenter:null onpointerleave:null onafterprint:null onbeforeprint:null onbeforeunload:null onhashchange:null onlanguagechange:null onmessage:null onmessageerror:null onoffline:null ononline:null onpagehide:null onpageshow:null onpopstate:null onrejectionhandled:null onstorage:null onunhandledrejection:null onunload:null performance:[object Performance] stop:function stop() { [native code] } open:function open() { [native code] } alert:function alert() { [native code] } confirm:function confirm() { [native code] } prompt:function prompt() { [native code] } print:function print() { [native code] } requestAnimationFrame:function requestAnimationFrame() { [native code] } cancelAnimationFrame:function cancelAnimationFrame() { [native code] } requestIdleCallback:function requestIdleCallback() { [native code] } cancelIdleCallback:function cancelIdleCallback() { [native code] } captureEvents:function captureEvents() { [native code] } releaseEvents:function releaseEvents() { [native code] } getComputedStyle:function getComputedStyle() { [native code] } matchMedia:function matchMedia() { [native code] } moveTo:function moveTo() { [native code] } moveBy:function moveBy() { [native code] } resizeTo:function resizeTo() { [native code] } resizeBy:function resizeBy() { [native code] } getSelection:function getSelection() { [native code] } find:function find() { [native code] } webkitRequestAnimationFrame:function webkitRequestAnimationFrame() { [native code] } webkitCancelAnimationFrame:function webkitCancelAnimationFrame() { [native code] } fetch:function fetch() { [native code] } btoa:function btoa() { [native code] } atob:function atob() { [native code] } setTimeout:function setTimeout() { [native code] } clearTimeout:function clearTimeout() { [native code] } setInterval:function setInterval() { [native code] } clearInterval:function clearInterval() { [native code] } createImageBitmap:function createImageBitmap() { [native code] } scroll:function scroll() { [native code] } scrollTo:function scrollTo() { [native code] } scrollBy:function scrollBy() { [native code] } onappinstalled:null onbeforeinstallprompt:null crypto:[object Crypto] ondevicemotion:null ondeviceorientation:null ondeviceorientationabsolute:null indexedDB:[object IDBFactory] webkitStorageInfo:[object DeprecatedStorageInfo] sessionStorage:[object Storage] localStorage:[object Storage] chrome:[object Object] visualViewport:[object VisualViewport] speechSynthesis:[object SpeechSynthesis] webkitRequestFileSystem:function () { [native code] } webkitResolveLocalFileSystemURL:function () { [native code] } openDatabase:function () { [native code] } caches:[object CacheStorage] str:postMessage:function () { [native code] } blur:function () { [native code] } focus:function () { [native code] } close:function () { [native code] } frames:[object Window] self:[object Window] window:[object Window] parent:[object Window] opener:null top:[object Window] length:0 closed:false location:http://localhost:63342 document:[object HTMLDocument] origin:http://localhost:63342 name: history:[object History] locationbar:[object BarProp] menubar:[object BarProp] personalbar:[object BarProp] scrollbars:[object BarProp] statusbar:[object BarProp] toolbar:[object BarProp] status: frameElement:null navigator:[object Navigator] applicationCache:[object ApplicationCache] customElements:[object CustomElementRegistry] external:[object External] screen:[object Screen] innerWidth:730 innerHeight:974 scrollX:0 pageXOffset:0 scrollY:0 pageYOffset:0 screenX:0 screenY:0 outerWidth:1920 outerHeight:1040 devicePixelRatio:1 clientInformation:[object Navigator] screenLeft:0 screenTop:0 defaultStatus: defaultstatus: styleMedia:[object StyleMedia] onanimationend:null onanimationiteration:null onanimationstart:null onsearch:null ontransitionend:null onwebkitanimationend:null onwebkitanimationiteration:null onwebkitanimationstart:null onwebkittransitionend:null isSecureContext:true onabort:null onblur:null oncancel:null oncanplay:null oncanplaythrough:null onchange:null onclick:null onclose:null oncontextmenu:null oncuechange:null ondblclick:null ondrag:null ondragend:null ondragenter:null ondragleave:null ondragover:null ondragstart:null ondrop:null ondurationchange:null onemptied:null onended:null onerror:null onfocus:null oninput:null oninvalid:null onkeydown:null onkeypress:null onkeyup:null onload:null onloadeddata:null onloadedmetadata:null onloadstart:null onmousedown:null onmouseenter:null onmouseleave:null onmousemove:null onmouseout:null onmouseover:null onmouseup:null onmousewheel:null onpause:null onplay:null onplaying:null onprogress:null onratechange:null onreset:null onresize:null onscroll:null onseeked:null onseeking:null onselect:null onstalled:null onsubmit:null onsuspend:null ontimeupdate:null ontoggle:null onvolumechange:null onwaiting:null onwheel:null onauxclick:null ongotpointercapture:null onlostpointercapture:null onpointerdown:null onpointermove:null onpointerup:null onpointercancel:null onpointerover:null onpointerout:null onpointerenter:null onpointerleave:null onafterprint:null onbeforeprint:null onbeforeunload:null onhashchange:null onlanguagechange:null onmessage:null onmessageerror:null onoffline:null ononline:null onpagehide:null onpageshow:null onpopstate:null onrejectionhandled:null onstorage:null onunhandledrejection:null onunload:null performance:[object Performance] stop:function stop() { [native code] } open:function open() { [native code] } alert:function alert() { [native code] } confirm:function confirm() { [native code] } prompt:function prompt() { [native code] } print:function print() { [native code] } requestAnimationFrame:function requestAnimationFrame() { [native code] } cancelAnimationFrame:function cancelAnimationFrame() { [native code] } requestIdleCallback:function requestIdleCallback() { [native code] } cancelIdleCallback:function cancelIdleCallback() { [native code] } captureEvents:function captureEvents() { [native code] } releaseEvents:function releaseEvents() { [native code] } getComputedStyle:function getComputedStyle() { [native code] } matchMedia:function matchMedia() { [native code] } moveTo:function moveTo() { [native code] } moveBy:function moveBy() { [native code] } resizeTo:function resizeTo() { [native code] } resizeBy:function resizeBy() { [native code] } getSelection:function getSelection() { [native code] } find:function find() { [native code] } webkitRequestAnimationFrame:function webkitRequestAnimationFrame() { [native code] } webkitCancelAnimationFrame:function webkitCancelAnimationFrame() { [native code] } fetch:function fetch() { [native code] } btoa:function btoa() { [native code] } atob:function atob() { [native code] } setTimeout:function setTimeout() { [native code] } clearTimeout:function clearTimeout() { [native code] } setInterval:function setInterval() { [native code] } clearInterval:function clearInterval() { [native code] } createImageBitmap:function createImageBitmap() { [native code] } scroll:function scroll() { [native code] } scrollTo:function scrollTo() { [native code] } scrollBy:function scrollBy() { [native code] } onappinstalled:null onbeforeinstallprompt:null crypto:[object Crypto] ondevicemotion:null ondeviceorientation:null ondeviceorientationabsolute:null indexedDB:[object IDBFactory] webkitStorageInfo:[object DeprecatedStorageInfo] sessionStorage:[object Storage] localStorage:[object Storage] chrome:[object Object] visualViewport:[object VisualViewport] speechSynthesis:[object SpeechSynthesis] webkitRequestFileSystem:function () { [native code] } webkitResolveLocalFileSystemURL:function () { [native code] } openDatabase:function () { [native code] } caches:[object CacheStorage] arr:postMessage:function () { [native code] },blur:function () { [native code] },focus:function () { [native code] },close:function () { [native code] },frames:[object Window],self:[object Window],window:[object Window],parent:[object Window],opener:null,top:[object Window],length:0,closed:false,location:http://localhost:63342/%E5%89%8D%E7%AB%AF%E5%AD%A6%E4%B9%A0/JS/12/047.html?_ijt=4m557o9qt95o0f9e5im9rd8cru,document:[object HTMLDocument],origin:http://localhost:63342,name:,history:[object History],locationbar:[object BarProp],menubar:[object BarProp],personalbar:[object BarProp],scrollbars:[object BarProp],statusbar:[object BarProp],toolbar:[object BarProp],status:,frameElement:null,navigator:[object Navigator],applicationCache:[object ApplicationCache],customElements:[object CustomElementRegistry],external:[object External],screen:[object Screen],innerWidth:730,innerHeight:974,scrollX:0,pageXOffset:0,scrollY:0,pageYOffset:0,screenX:0,screenY:0,outerWidth:1920,outerHeight:1040,devicePixelRatio:1,clientInformation:[object Navigator],screenLeft:0,screenTop:0,defaultStatus:,defaultstatus:,styleMedia:[object StyleMedia],onanimationend:null,onanimationiteration:null,onanimationstart:null,onsearch:null,ontransitionend:null,onwebkitanimationend:null,onwebkitanimationiteration:null,onwebkitanimationstart:null,onwebkittransitionend:null,isSecureContext:true,onabort:null,onblur:null,oncancel:null,oncanplay:null,oncanplaythrough:null,onchange:null,onclick:null,onclose:null,oncontextmenu:null,oncuechange:null,ondblclick:null,ondrag:null,ondragend:null,ondragenter:null,ondragleave:null,ondragover:null,ondragstart:null,ondrop:null,ondurationchange:null,onemptied:null,onended:null,onerror:null,onfocus:null,oninput:null,oninvalid:null,onkeydown:null,onkeypress:null,onkeyup:null,onload:null,onloadeddata:null,onloadedmetadata:null,onloadstart:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmousewheel:null,onpause:null,onplay:null,onplaying:null,onprogress:null,onratechange:null,onreset:null,onresize:null,onscroll:null,onseeked:null,onseeking:null,onselect:null,onstalled:null,onsubmit:null,onsuspend:null,ontimeupdate:null,ontoggle:null,onvolumechange:null,onwaiting:null,onwheel:null,onauxclick:null,ongotpointercapture:null,onlostpointercapture:null,onpointerdown:null,onpointermove:null,onpointerup:null,onpointercancel:null,onpointerover:null,onpointerout:null,onpointerenter:null,onpointerleave:null,onafterprint:null,onbeforeprint:null,onbeforeunload:null,onhashchange:null,onlanguagechange:null,onmessage:null,onmessageerror:null,onoffline:null,ononline:null,onpagehide:null,onpageshow:null,onpopstate:null,onrejectionhandled:null,onstorage:null,onunhandledrejection:null,onunload:null,performance:[object Performance],stop:function stop() { [native code] },open:function open() { [native code] },alert:function alert() { [native code] },confirm:function confirm() { [native code] },prompt:function prompt() { [native code] },print:function print() { [native code] },requestAnimationFrame:function requestAnimationFrame() { [native code] },cancelAnimationFrame:function cancelAnimationFrame() { [native code] },requestIdleCallback:function requestIdleCallback() { [native code] },cancelIdleCallback:function cancelIdleCallback() { [native code] },captureEvents:function captureEvents() { [native code] },releaseEvents:function releaseEvents() { [native code] },getComputedStyle:function getComputedStyle() { [native code] },matchMedia:function matchMedia() { [native code] },moveTo:function moveTo() { [native code] },moveBy:function moveBy() { [native code] },resizeTo:function resizeTo() { [native code] },resizeBy:function resizeBy() { [native code] },getSelection:function getSelection() { [native code] },find:function find() { [native code] },webkitRequestAnimationFrame:function webkitRequestAnimationFrame() { [native code] },webkitCancelAnimationFrame:function webkitCancelAnimationFrame() { [native code] },fetch:function fetch() { [native code] },btoa:function btoa() { [native code] },atob:function atob() { [native code] },setTimeout:function setTimeout() { [native code] },clearTimeout:function clearTimeout() { [native code] },setInterval:function setInterval() { [native code] },clearInterval:function clearInterval() { [native code] },createImageBitmap:function createImageBitmap() { [native code] },scroll:function scroll() { [native code] },scrollTo:function scrollTo() { [native code] },scrollBy:function scrollBy() { [native code] },onappinstalled:null,onbeforeinstallprompt:null,crypto:[object Crypto],ondevicemotion:null,ondeviceorientation:null,ondeviceorientationabsolute:null,indexedDB:[object IDBFactory],webkitStorageInfo:[object DeprecatedStorageInfo],sessionStorage:[object Storage],localStorage:[object Storage],chrome:[object Object],visualViewport:[object VisualViewport],speechSynthesis:[object SpeechSynthesis],webkitRequestFileSystem:function () { [native code] },webkitResolveLocalFileSystemURL:function () { [native code] },openDatabase:function () { [native code] },caches:[object CacheStorage],str:postMessage:function () { [native code] },blur:function () { [native code] },focus:function () { [native code] },close:function () { [native code] },frames:[object Window],self:[object Window],window:[object Window],parent:[object Window],opener:null,top:[object Window],length:0,closed:false,location:http://localhost:63342/%E5%89%8D%E7%AB%AF%E5%AD%A6%E4%B9%A0/JS/12/047.html?_ijt=4m557o9qt95o0f9e5im9rd8cru,document:[object HTMLDocument],origin:http://localhost:63342,name:,history:[object History],locationbar:[object BarProp],menubar:[object BarProp],personalbar:[object BarProp],scrollbars:[object BarProp],statusbar:[object BarProp],toolbar:[object BarProp],status:,frameElement:null,navigator:[object Navigator],applicationCache:[object ApplicationCache],customElements:[object CustomElementRegistry],external:[object External],screen:[object Screen],innerWidth:730,innerHeight:974,scrollX:0,pageXOffset:0,scrollY:0,pageYOffset:0,screenX:0,screenY:0,outerWidth:1920,outerHeight:1040,devicePixelRatio:1,clientInformation:[object Navigator],screenLeft:0,screenTop:0,defaultStatus:,defaultstatus:,styleMedia:[object StyleMedia],onanimationend:null,onanimationiteration:null,onanimationstart:null,onsearch:null,ontransitionend:null,onwebkitanimationend:null,onwebkitanimationiteration:null,onwebkitanimationstart:null,onwebkittransitionend:null,isSecureContext:true,onabort:null,onblur:null,oncancel:null,oncanplay:null,oncanplaythrough:null,onchange:null,onclick:null,onclose:null,oncontextmenu:null,oncuechange:null,ondblclick:null,ondrag:null,ondragend:null,ondragenter:null,ondragleave:null,ondragover:null,ondragstart:null,ondrop:null,ondurationchange:null,onemptied:null,onended:null,onerror:null,onfocus:null,oninput:null,oninvalid:null,onkeydown:null,onkeypress:null,onkeyup:null,onload:null,onloadeddata:null,onloadedmetadata:null,onloadstart:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmousewheel:null,onpause:null,onplay:null,onplaying:null,onprogress:null,onratechange:null,onreset:null,onresize:null,onscroll:null,onseeked:null,onseeking:null,onselect:null,onstalled:null,onsubmit:null,onsuspend:null,ontimeupdate:null,ontoggle:null,onvolumechange:null,onwaiting:null,onwheel:null,onauxclick:null,ongotpointercapture:null,onlostpointercapture:null,onpointerdown:null,onpointermove:null,onpointerup:null,onpointercancel:null,onpointerover:null,onpointerout:null,onpointerenter:null,onpointerleave:null,onafterprint:null,onbeforeprint:null,onbeforeunload:null,onhashchange:null,onlanguagechange:null,onmessage:null,onmessageerror:null,onoffline:null,ononline:null,onpagehide:null,onpageshow:null,onpopstate:null,onrejectionhandled:null,onstorage:null,onunhandledrejection:null,onunload:null,performance:[object Performance],stop:function stop() { [native code] },open:function open() { [native code] },alert:function alert() { [native code] },confirm:function confirm() { [native code] },prompt:function prompt() { [native code] },print:function print() { [native code] },requestAnimationFrame:function requestAnimationFrame() { [native code] },cancelAnimationFrame:function cancelAnimationFrame() { [native code] },requestIdleCallback:function requestIdleCallback() { [native code] },cancelIdleCallback:function cancelIdleCallback() { [native code] },captureEvents:function captureEvents() { [native code] },releaseEvents:function releaseEvents() { [native code] },getComputedStyle:function getComputedStyle() { [native code] },matchMedia:function matchMedia() { [native code] },moveTo:function moveTo() { [native code] },moveBy:function moveBy() { [native code] },resizeTo:function resizeTo() { [native code] },resizeBy:function resizeBy() { [native code] },getSelection:function getSelection() { [native code] },find:function find() { [native code] },webkitRequestAnimationFrame:function webkitRequestAnimationFrame() { [native code] },webkitCancelAnimationFrame:function webkitCancelAnimationFrame() { [native code] },fetch:function fetch() { [native code] },btoa:function btoa() { [native code] },atob:function atob() { [native code] },setTimeout:function setTimeout() { [native code] },clearTimeout:function clearTimeout() { [native code] },setInterval:function setInterval() { [native code] },clearInterval:function clearInterval() { [native code] },createImageBitmap:function createImageBitmap() { [native code] },scroll:function scroll() { [native code] },scrollTo:function scrollTo() { [native code] },scrollBy:function scrollBy() { [native code] },onappinstalled:null,onbeforeinstallprompt:null,crypto:[object Crypto],ondevicemotion:null,ondeviceorientation:null,ondeviceorientationabsolute:null,indexedDB:[object IDBFactory],webkitStorageInfo:[object DeprecatedStorageInfo],sessionStorage:[object Storage],localStorage:[object Storage],chrome:[object Object],visualViewport:[object VisualViewport],speechSynthesis:[object SpeechSynthesis],webkitRequestFileSystem:function () { [native code] },webkitResolveLocalFileSystemURL:function () { [native code] },openDatabase:function () { [native code] },caches:[object CacheStorage],, attr:attr TEMPORARY:0 PERSISTENT:1 addEventListener:function addEventListener() { [native code] } removeEventListener:function removeEventListener() { [native code] } dispatchEvent:function dispatchEvent() { [native code] }