js for in 输出window对象所有属性
<html>
<head>
<title>window object properties array</title>
</head>
<body>
<script>
for (var i in window) {
document.write ("window property(" + i + "): " +
window[i] + "<br>");
}
</script>
</body>
</html>
输出结果
(onbeforeunload): null
window property(onafterprint): null
window property(top): [object]
window property(location): http://www.111cn.net
window property(parent): [object]
window property(offscreenbuffering): auto
window property(frameelement): null
window property(onerror): null
window property(screen): [object]
window property(event): null
window property(clipboarddata): [object]
window property(onresize): null
window property(defaultstatus):
window property(onblur): null
window property(window): [object]
window property(onload): null
window property(onscroll): null
window property(screentop): 127
window property(onfocus): null
window property(option): [object]
window property(length): 0
window property(onbeforeprint): null
window property(frames): [object]
window property(self): [object]
window property(clientinformation):
window property(external): undefined
window property(screenleft): -2
window property(opener): [object]
window property(onunload): null
window property(document): [object]
window property(closed): false
window property(history): [object]
window property(image): [object]
window property(navigator):
window property(status):
window property(onhelp): null
window property(name):
浏览器事件
<form name="aform">
<input type="button" name="big_button" value="big button" onclick="alert('the big button was pressed!')";>
</form>
<script language='网页特效'>
<!--
var aproperty;
for (aproperty in document.aform.big_button) {
document.write(aproperty,"<br>");
}
//-->
</script>
language
scrollheight
istextedit
currentstyle
document
onmouseup
oncontextmenu
ismultiline
clientheight
onrowexit
onbeforepaste
onactivate
scrollleft
lang
onmousemove
onmove
onselectstart
parenttextedit
oncontrolselect
canhavehtml
onkeypress
oncut
onrowenter
onmousedown
onpaste
classname
id
onreadystatechange
onbeforedeactivate
hidefocus
dir
iscontenteditable
onkeydown
clientwidth
onlosecapture
parentelement
ondrag
ondragstart
oncellchange
recordnumber
onfilterchange
onrowsinserted
ondatasetcomplete
onmousewheel
ondragenter
onblur
onresizeend
onerrorupdate
onbeforecopy
ondblclick
scopename
onkeyup
onresizestart
onmouseo教程ver
onmouseleave
outertext
innertext
onmoveend
tagname
title
offsetwidth
onresize
contenteditable
runtimestyle
filters
ondrop
onpage
onrowsdelete
tagurn
offsetleft
clienttop
style
onfocusout
clientleft
ondatasetchanged
canhavechildren
ondeactivate
isdisabled
onpropertychange
ondragover
onhelp
ondragend
onbeforeeditfocus
disabled
onfocus
behaviorurns
accesskey
onscroll
onbeforeactivate
onbeforecut
readystate
all
sourceindex
onclick
scrolltop
oncopy
onfocusin
tabindex
onbeforeupdate
outerhtml
innerhtml
ondataavailable
offsetheight
onmovestart
onmouseout
scrollwidth
offsettop
onmouseenter
onlayoutcomplete
offsetparent
onafterupdate
ondragleave
children
start
readonly
firstchild
type
height
alt
form
onerror
hspace
maxlength
loop
onselect
lastchild
nodename
nodetype
width
dynsrc
attributes
childnodes
src
datafld
previoussibling
ownerdocument
parentnode
checked
onabort
accept
nodevalue
onchange
dataformatas
defaultchecked
vrml
datasrc
indeterminate
onload
align
usemap
lowsrc
complete
nextsibling
vspace
size
value
border
status
name
;