已废弃
该特性已经从 Web 标准中删除,虽然一些浏览器目前仍然支持它,但也许会在未来的某个时间停止支持,请尽量不要使用该特性。
这个方法用来在早期版本的Mozilla中清除整个指定文档。
在最近版本的基于Mozilla的应用以及Internet Explorer和Netscape 4中这个方法什么也不做
语法
document.clear()
已废弃
该特性已经从 Web 标准中删除,虽然一些浏览器目前仍然支持它,但也许会在未来的某个时间停止支持,请尽量不要使用该特性。
这个方法用来在早期版本的Mozilla中清除整个指定文档。
在最近版本的基于Mozilla的应用以及Internet Explorer和Netscape 4中这个方法什么也不做
document.clear()
Document
activeElement
alinkColor
anchors
applets
async
bgColor
body
characterSet
childElementCount
children
compatMode
contentType
currentScript
defaultView
designMode
dir
doctype
documentElement
documentURI
documentURIObject
domain
domConfig
embeds
fgColor
firstElementChild
forms
mozFullScreen
mozFullScreenElement
mozFullScreenEnabled
head
height
hidden
images
implementation
lastElementChild
lastModified
lastStyleSheetSet
linkColor
links
location
mozSyntheticDocument
onabort
onafterscriptexecute
onanimationcancel
onanimationend
onanimationiteration
[我来译!]onauxclick
[我来译!]onbeforescriptexecute
onblur
onchange
onclick
onclose
oncontextmenu
ondblclick
onerror
onfocus
onfullscreenchange
onfullscreenerror
ongotpointercapture
oninput
onkeydown
onkeypress
onkeyup
onload
onloadend
onloadstart
[我来译!]onlostpointercapture
[我来译!]onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
onoffline
ononline
[我来译!]onpointercancel
[我来译!]onpointerdown
onpointerenter
[我来译!]onpointerleave
[我来译!]onpointermove
[我来译!]onpointerout
[我来译!]onpointerover
[我来译!]onpointerup
[我来译!]onreset
onresize
onscroll
onselect
onselectionchange
[我来译!]onselectionchange
[我来译!]onselectstart
[我来译!]onsubmit
ontouchcancel
ontouchmove
ontouchstart
[我来译!]ontransitioncancel
[我来译!]ontransitionend
[我来译!]onvisibilitychange
[我来译!]onwheel
origin
[我来译!]plugins
[我来译!]pointerLockElement
popupNode
[我来译!]preferredStyleSheetSet
[我来译!]readyState
referrer
scripts
scrollingElement
[我来译!]selectedStyleSheetSet
[我来译!]styleSheets
styleSheetSets
timeline
title
tooltipNode
URL
visibilityState
vlinkColor
[我来译!]width
xmlEncoding
[我来译!]xmlVersion
[我来译!]adoptNode()
append()
caretPositionFromPoint()
caretRangeFromPoint()
[我来译!]clear()
close
createAttribute
createCDATASection()
[我来译!]createComment
createDocumentFragment()
createElement()
createElementNS()
createEntityReference()
[我来译!]createEvent()
createExpression
createNodeIterator()
createNSResolver()
[我来译!]createProcessingInstruction()
createRange()
createTextNode
createTouch()
[我来译!]createTouchList()
[我来译!]createTreeWalker()
elementFromPoint()
enableStyleSheetsForSet()
[我来译!]evaluate
execCommand
exitFullscreen()
exitPointerLock()
[我来译!]getAnimations()
[我来译!]getBoxObjectFor()
[我来译!]getElementById
getElementsByClassName()
getElementsByName()
getElementsByTagName()
getElementsByTagNameNS()
getSelection
hasFocus
importNode
loadOverlay()
[我来译!]mozSetImageElement()
[我来译!]open()
prepend()
queryCommandEnabled()
queryCommandSupported()
querySelector()
querySelectorAll
querySelectorAll()
registerElement()
releaseCapture
write
writeln
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CSSValueList
CharacterData
ChildNode
Comment
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
DocumentFragment
DocumentType
Element
ElementTraversal
Entity
EntityReference
Event
EventTarget
HTMLCollection
MutationObserver
Node
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
Range
Text
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument