概述
返回文档地址字符串,按照 DOM4 规范,该属性是只读的。
语法
var string = document.documentURI;
备注
HTML 文档有一个 document.URL
属性返回同样的值。但是不像 URL
,documentURL
适用于所有类型的文档。
返回文档地址字符串,按照 DOM4 规范,该属性是只读的。
var string = document.documentURI;
HTML 文档有一个 document.URL
属性返回同样的值。但是不像 URL
,documentURL
适用于所有类型的文档。
Document
Document.activeElement
Document.alinkColor
Document.anchors
Document.applets
Document.async
Document.bgColor
Document.body
Document.characterSet
ParentNode.childElementCount
ParentNode.children
Document.compatMode
Document.contentType
Document.currentScript
Document.defaultView
Document.designMode
Document.dir
Document.doctype
Document.documentElement
Document.documentURI
Document.documentURIObject
Document.domain
Document.domConfig
Document.embeds
Document.fgColor
ParentNode.firstElementChild
Document.forms
Document.head
Document.height
Document.images
Document.implementation
Document.inputEncoding
ParentNode.lastElementChild
Document.lastModified
Document.lastStyleSheetSet
Document.linkColor
Document.links
Document.location
Document.mozFullScreen
Document.mozFullScreenElement
Document.mozFullScreenEnabled
Document.mozSyntheticDocument
GlobalEventHandlers.onabort
Document.onafterscriptexecute
Document.onbeforescriptexecute
GlobalEventHandlers.onblur
GlobalEventHandlers.onchange
GlobalEventHandlers.onclick
GlobalEventHandlers.onclose
GlobalEventHandlers.oncontextmenu
GlobalEventHandlers.ondblclick
GlobalEventHandlers.onerror
GlobalEventHandlers.onfocus
GlobalEventHandlers.oninput
GlobalEventHandlers.onkeydown
GlobalEventHandlers.onkeypress
GlobalEventHandlers.onkeyup
GlobalEventHandlers.onload
GlobalEventHandlers.onmousedown
GlobalEventHandlers.onmousemove
GlobalEventHandlers.onmouseout
GlobalEventHandlers.onmouseover
GlobalEventHandlers.onmouseup
Document.onoffline
Document.ononline
GlobalEventHandlers.onscroll
GlobalEventHandlers.onselect
GlobalEventHandlers.onsubmit
Document.origin
Document.plugins
Document.pointerLockElement
Document.popupNode
Document.preferredStyleSheetSet
Document.readyState
Document.referrer
Document.scripts
Document.selectedStyleSheetSet
Document.styleSheets
Document.styleSheetSets
Document.title
Document.tooltipNode
Document.URL
Document.vlinkColor
Document.width
Document.xmlEncoding
Document.xmlVersion
Document.adoptNode()
Document.caretPositionFromPoint()
Document.clear()
Document.close()
Document.createAttribute()
Document.createCDATASection()
Document.createComment()
Document.createDocumentFragment()
Document.createElement()
Document.createElementNS()
Document.createEntityReference()
Document.createEvent()
Document.createExpression()
Document.createNodeIterator()
Document.createNSResolver()
Document.createProcessingInstruction()
Document.createRange()
Document.createTextNode()
Document.createTouch()
Document.createTouchList()
Document.createTreeWalker()
Document.elementFromPoint()
Document.enableStyleSheetsForSet()
Document.evaluate()
Document.execCommand()
Document.exitPointerLock()
Document.getBoxObjectFor()
Document.getElementById()
Document.getElementsByClassName()
Document.getElementsByName()
Document.getElementsByTagName()
Document.getElementsByTagNameNS()
Document.getSelection()
Document.hasFocus()
Document.importNode()
Document.loadOverlay()
Document.mozCancelFullScreen()
Document.mozSetImageElement()
Document.open()
Document.queryCommandSupported()
Document.querySelector()
Document.querySelectorAll()
Document.registerElement()
Document.releaseCapture()
Document.write()
Document.writeln()