document對象的方法、屬性和事件

<body>
1.在瀏覽器對象中,document文檔對象是核心,表示整個網頁文檔中的實際內容。使用document對象可以訪問HTML文檔中的基本元素,並可以對元素進行編程,設置元素的屬性。<br />
2.在document對象中,包含links對象/anchor對象/form對象/images對象等。<br />
3.document對象是window對象的下一層對性,不需要預先實例化就可直接使用。document對象描述當前窗口或指定窗口對象文檔,它包含了頁面的實際內容,指的是HTML文檔中從head   /body的內容。它的屬性和方法一般會影響窗口的文檔的外觀和內容。<br />

列出document對象屬性/方法和事件。<br />
<script language="javascript">
    var d;
 for(d in document)
 {
  document.write(d+"<br>");
 }

</script>

</body>
 

結果爲:

列出document對象屬性/方法和事件。
parentNode
onrowenter
styleSheets
embeds
defaultCharset
onselectionchange
forms
parentWindow
onbeforeactivate
ondblclick
onfocusin
protocol
oncontrolselect
links
nextSibling
fileUpdatedDate
images
selection
namespaces
onbeforedeactivate
dir
onkeydown
nodeType
media
ondragstart
activeElement
onpropertychange
fileModifiedDate
onrowsinserted
onmouseup
oncontextmenu
onmssitemodejumplistitemremoved
doctype
implementation
onbeforeupdate
onreadystatechange
plugins
nodeName
linkColor
onselectstart
anchors
onrowexit
lastChild
onactivate
onfocusout
nodeValue
fgColor
onmouseover
nameProp
scripts
onstop
onmsthumbnailclick
onmousemove
title
fileSize
documentMode
onbeforeeditfocus
cookie
ownerDocument
alinkColor
applets
onkeypress
mimeType
security
ondeactivate
frames
fileCreatedDate
ondatasetchanged
ondataavailable
vlinkColor
compatible
body
onafterupdate
onmousewheel
onkeyup
readyState
onmouseout
onrowsdelete
URLUnencoded
firstChild
oncellchange
childNodes
bgColor
onhelp
attributes
onerrorupdate
all
lastModified
onmousedown
location
previousSibling
onclick
referrer
ondatasetcomplete
onstorage
domain
onstoragecommit
compatMode
URL
documentElement
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章