Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Document.origin

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

The Document.origin read-only property returns the document's origin. In most cases, this property is equivalent to document.defaultView.location.origin.

Examples

var origin = document.origin; 
// On this page, returns:'https://developer.mozilla.org'

var origin = document.origin; 
// On "about:blank", returns:'null'

var origin = document.origin; 
// On "data:text/html,<b>foo</b>", returns:'null'

Specifications

Specification Status Comment
DOM
The definition of 'Document.origin' in that specification.
Living Standard Initial definition.
WHATWG HTML Living Standard
The definition of 'origin for Document objects' in that specification.
Living Standard Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 41 Not supported bug 931884 Not supported Not supported Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported Not supported Not supported Not supported Not supported Not supported

See also

문서 태그 및 공헌자

 이 페이지의 공헌자: teoli, ziyunfei
 최종 변경: teoli,