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

Document.documentURI - URI

documentURIは、Documentのプロパティです。ドキュメントに関連付けられたURIを返します。Document.URLLocation.hrefと値は同じです。

概要

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

説明

ドキュメントのURIを返す。読み取り専用なので、値を代入して変更することはできない。

デモ

Document.documentURIのデモです。

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

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

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

サポート状況

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