window成员和document成员
输出浏览器成员和DOM成员(以下为safari浏览器测试)(浏览器不同对象成员有差异)
window成员
<script type="text/javascript">
//输出window成员
for(x in window)
document.write(x +"<br>");
</script>
window
document
screen
history
locationbar
menubar
personalbar
scrollbars
statusbar
toolbar
navigator
clientInformation
crypto
location
event
frameElement
offscreenBuffering
outerHeight
outerWidth
innerHeight
innerWidth
screenX
screenY
screenLeft
screenTop
scrollX
scrollY
pageXOffset
pageYOffset
closed
length
name
status
defaultStatus
defaultstatus
self
frames
opener
parent
top
styleMedia
devicePixelRatio
applicationCache
sessionStorage
localStorage
performance
CSS
webkitNotifications
speechSynthesis
getSelection
focus
blur
close
stop
open
showModalDialog
alert
confirm
prompt
find
scrollBy
scrollTo
scroll
moveBy
moveTo
resizeBy
resizeTo
matchMedia
getComputedStyle
getMatchedCSSRules
webkitConvertPointFromPageToNode
webkitConvertPointFromNodeToPage
postMessage
requestAnimationFrame
cancelAnimationFrame
webkitRequestAnimationFrame
webkitCancelAnimationFrame
webkitCancelRequestAnimationFrame
addEventListener
removeEventListener
dispatchEvent
captureEvents
releaseEvents
openDatabase
atob
btoa
setTimeout
clearTimeout
setInterval
clearInterval
document成员
<script type="text/javascript">
//输出document成员
for(x in document)
document.write(x +"<br>");
</script>
embeds
plugins
scripts
all
width
height
dir
designMode
compatMode
bgColor
fgColor
alinkColor
linkColor
vlinkColor
location
open
close
write
writeln
clear
captureEvents
releaseEvents
doctype
implementation
documentElement
inputEncoding
xmlEncoding
xmlVersion
xmlStandalone
documentURI
defaultView
styleSheets
contentType
title
referrer
domain
URL
cookie
body
head
images
applets
links
forms
anchors
lastModified
charset
defaultCharset
readyState
characterSet
preferredStylesheetSet
selectedStylesheetSet
activeElement
webkitIsFullScreen
webkitFullScreenKeyboardInputAllowed
webkitCurrentFullScreenElement
webkitFullscreenEnabled
webkitFullscreenElement
visibilityState
hidden
currentScript
origin
scrollingElement
children
firstElementChild
lastElementChild
childElementCount
createElement
createDocumentFragment
createTextNode
createComment
createCDATASection
createProcessingInstruction
createAttribute
createEntityReference
getElementsByTagName
importNode
createElementNS
createAttributeNS
getElementsByTagNameNS
adoptNode
createEvent
createRange
createNodeIterator
createTreeWalker
getOverrideStyle
createExpression
createNSResolver
evaluate
execCommand
queryCommandEnabled
queryCommandIndeterm
queryCommandState
queryCommandSupported
queryCommandValue
getElementsByName
elementFromPoint
caretRangeFromPoint
getSelection
getCSSCanvasContext
getElementsByClassName
hasFocus
webkitCancelFullScreen
webkitExitFullscreen
webkitGetNamedFlows
getElementById
querySelector
querySelectorAll
nodeName
nodeValue
nodeType
parentNode
childNodes
firstChild
lastChild
previousSibling
nextSibling
ownerDocument
namespaceURI
prefix
localName
baseURI
textContent
parentElement
ELEMENT_NODE
ATTRIBUTE_NODE
TEXT_NODE
CDATA_SECTION_NODE
ENTITY_REFERENCE_NODE
ENTITY_NODE
PROCESSING_INSTRUCTION_NODE
COMMENT_NODE
DOCUMENT_NODE
DOCUMENT_TYPE_NODE
DOCUMENT_FRAGMENT_NODE
NOTATION_NODE
DOCUMENT_POSITION_DISCONNECTED
DOCUMENT_POSITION_PRECEDING
DOCUMENT_POSITION_FOLLOWING
DOCUMENT_POSITION_CONTAINS
DOCUMENT_POSITION_CONTAINED_BY
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
insertBefore
replaceChild
removeChild
appendChild
hasChildNodes
cloneNode
normalize
isSupported
isSameNode
isEqualNode
lookupPrefix
isDefaultNamespace
lookupNamespaceURI
compareDocumentPosition
contains
addEventListener
removeEventListener
dispatchEvent