From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/document/url/index.html | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 files/ja/web/api/document/url/index.html (limited to 'files/ja/web/api/document/url/index.html') diff --git a/files/ja/web/api/document/url/index.html b/files/ja/web/api/document/url/index.html new file mode 100644 index 0000000000..e881a6c1f2 --- /dev/null +++ b/files/ja/web/api/document/url/index.html @@ -0,0 +1,75 @@ +--- +title: Document.URL +slug: Web/API/Document/URL +tags: + - API + - Document + - HTML DOM + - URL + - プロパティ + - リファレンス +translation_of: Web/API/Document/URL +--- +
{{APIRef("DOM")}}
+ +

{{domxref("Document")}} インターフェイスの URL プロパティは読取専用で、文書の位置を文字列で返します。

+ +

構文

+ +
var string = document.URL
+
+ +

+ +

JavaScript

+ +
document.getElementById("url").textContent = document.URL;
+ +

HTML

+ +
<p id="urlText">
+  URL:<br/>
+  <span id="url">URL goes here</span>
+</p>
+ +

結果

+ +

{{EmbedLiveSample("Example", "100%", 100)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("DOM WHATWG", "#dom-document-url", "Document.URL")}}{{Spec2("DOM WHATWG")}}プロパティを {{domxref("DOMString")}} ではなく {{domxref("USVString")}} と定義
{{SpecName("DOM1", "level-one-html.html#attribute-URL", "Document.URL")}}{{Spec2("DOM1")}}初回定義
+ +

ブラウザーの対応

+ +
+ + +

{{Compat("api.Document.URL")}}

+
+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf