SYNCERのロゴ
アイキャッチ画像

Document.origin - オリジン

originは、Documentのプロパティです。ドキュメントに関連付けられたオリジンを返します。

概要

名前
origin
所属
Document
IDL
readonly attribute USVString origin;
仕様書
https://dom.spec.whatwg.org/#dom-document-origin

説明

ドキュメントのオリジンを返す。オリジンが存在しない場合、nullを返す。

デモ

Document.originのデモです。

<!-- このコードは編集できます。 -->

<!DOCTYPE html>
<html>
<body>
<script>
var value = document.origin ;

console.log( value ) ;
document.body.appendChild( new Text( value ) ) ;
</script>
</body>
</html>

サポート状況

ChromeFirefoxSafariEdgeIEOperaiOS SafariAndroid
41+確認中 7.1+×× 28+ 8.3+×
  • Twitterでシェア
  • Facebookでシェア
  • Google+でシェア
  • はてなブックマークでシェア
  • pocketに保存
  • LINEでシェア
更新履歴
2017年10月5日 (木)
コンテンツを公開しました。