概述
返回打开当前窗口的那个窗口的引用.
语法
var objRef = window.opener;
例子
if (window.opener != indexWin) { referToTop(window.opener); }
备注
如果当前窗口是由另一个窗口打开的, window.opener保留了那个窗口的引用. 如果当前窗口不是由其他窗口打开的, 则该属性返回 null.
规范
DOM Level 0 不属于任何标准.
返回打开当前窗口的那个窗口的引用.
var objRef = window.opener;
if (window.opener != indexWin) { referToTop(window.opener); }
如果当前窗口是由另一个窗口打开的, window.opener保留了那个窗口的引用. 如果当前窗口不是由其他窗口打开的, 则该属性返回 null.
DOM Level 0 不属于任何标准.
Window
Window.applicationCache
Window.closed
Window.controllers
Window.crypto
Window.defaultStatus
Window.devicePixelRatio
Window.dialogArguments
Window.directories
Window.document
Window.frameElement
Window.frames
Window.fullScreen
Window.history
IDBEnvironment.indexedDB
Window.innerHeight
Window.innerWidth
Window.length
Window.localStorage
Window.location
Window.locationbar
Window.menubar
Window.messageManager
Window.mozAnimationStartTime
Window.mozInnerScreenX
Window.mozInnerScreenY
Window.mozPaintCount
Window.name
Window.navigator
GlobalEventHandlers.onabort
Window.onafterprint
Window.onbeforeprint
WindowEventHandlers.onbeforeunload
GlobalEventHandlers.onblur
Window.onblur
GlobalEventHandlers.onchange
Window.onchange
GlobalEventHandlers.onclick
Window.onclick
GlobalEventHandlers.onclose
GlobalEventHandlers.oncontextmenu
GlobalEventHandlers.ondblclick
Window.ondevicelight
Window.ondevicemotion
Window.ondeviceorientation
Window.ondeviceproximity
Window.ondragdrop
GlobalEventHandlers.onerror
GlobalEventHandlers.onfocus
Window.onfocus
WindowEventHandlers.onhashchange
GlobalEventHandlers.oninput
GlobalEventHandlers.onkeydown
Window.onkeydown
Window.onkeypress
GlobalEventHandlers.onkeypress
Window.onkeyup
GlobalEventHandlers.onkeyup
WindowEventHandlers.onlanguagechange
GlobalEventHandlers.onload
GlobalEventHandlers.onmousedown
Window.onmousedown
Window.onmousemove
GlobalEventHandlers.onmousemove
Window.onmouseout
GlobalEventHandlers.onmouseout
Window.onmouseover
GlobalEventHandlers.onmouseover
GlobalEventHandlers.onmouseup
Window.onmouseup
Window.onmozbeforepaint
Window.onmoztimechange
Window.onpaint
WindowEventHandlers.onpopstate
Window.onreset
Window.onresize
GlobalEventHandlers.onscroll
Window.onscroll
GlobalEventHandlers.onselect
GlobalEventHandlers.onsubmit
WindowEventHandlers.onunload
Window.onuserproximity
Window.opener
Window.outerHeight
Window.outerWidth
Window.parent
Window.performance
Window.personalbar
Window.pkcs11
Window.screen
Window.screenX
Window.screenY
Window.scrollbars
Window.scrollMaxX
Window.scrollMaxY
Window.scrollX
Window.scrollY
Window.self
Window.sessionStorage
Window.status
Window.statusbar
Window.toolbar
Window.top
Window.URL
Window.window
Window.alert()
WindowBase64.atob()
Window.back()
Window.blur()
WindowBase64.btoa()
Window.cancelAnimationFrame()
Window.captureEvents()
Window.clearImmediate()
WindowTimers.clearInterval()
WindowTimers.clearTimeout()
Window.close()
Window.confirm()
Window.convertPointFromNodeToPage()
Window.dump()
Window.find()
Window.focus()
Window.forward()
Window.getAttention()
Window.getComputedStyle()
Window.getDefaultComputedStyle()
Window.getSelection()
Window.home()
Window.importDialog()
Window.matchMedia()
Window.minimize()
Window.moveBy()
Window.moveTo()
Window.open()
Window.openDialog()
Window.postMessage()
Window.print()
Window.prompt()
Window.releaseEvents()
Window.requestAnimationFrame()
Window.resizeBy()
Window.resizeTo()
Window.restore()
Window.routeEvent()
Window.scroll()
Window.scrollBy()
Window.scrollByLines()
Window.scrollByPages()
Window.scrollTo()
Window.setCursor()
Window.setImmediate()
WindowTimers.setInterval()
WindowTimers.setTimeout()
Window.showModalDialog()
Window.sizeToContent()
Window.stop()
Window.updateCommands()