From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../reference/global_objects/unescape/index.html | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 files/ja/web/javascript/reference/global_objects/unescape/index.html (limited to 'files/ja/web/javascript/reference/global_objects/unescape/index.html') diff --git a/files/ja/web/javascript/reference/global_objects/unescape/index.html b/files/ja/web/javascript/reference/global_objects/unescape/index.html new file mode 100644 index 0000000000..8e12ccab38 --- /dev/null +++ b/files/ja/web/javascript/reference/global_objects/unescape/index.html @@ -0,0 +1,77 @@ +--- +title: unescape() +slug: Web/JavaScript/Reference/Global_Objects/unescape +tags: + - Deprecated + - JavaScript + - Method +translation_of: Web/JavaScript/Reference/Global_Objects/unescape +--- +

{{jsSidebar("Objects")}}

+ +
警告: unescape() は厳密には (「ウェブ標準から削除された」という意味では) 非推奨になっていませんが、 ECMA-262 標準の Annex B において定義されており、導入部で次のように位置付けられています。 + +
… この附属書で規定されているすべての言語機能および動作は、1つ以上の望ましくない特性を有しており、古い使用例がない場合には,この仕様から削除される。 …
+… プログラマーは、新しい ECMAScript コードを書く際に、これらの機能や動作の存在を利用したり、仮定したりしてはいけない。 …
+
+ +

unescape() 関数は 16 進数エスケープシーケンスを、それが表す文字列に置換します。エスケープシーケンスは {{jsxref("escape")}} などの関数によって生成されます。通常は {{jsxref("decodeURI")}} または {{jsxref("decodeURIComponent")}} が unescape よりも推奨されます。

+ +
注 : URI のデコードに unescape を使用しないでください。代わりに decodeURI を使用してください。
+ +

構文

+ +
unescape(str)
+ +

引数

+ +
+
str
+
デコードされる文字列。
+
+ +

返値

+ +

特定の文字のエスケープが解除された新しい文字列です。

+ +

解説

+ +

unescape 関数はグローバルオブジェクトのプロパティです。

+ +

+ +

unescape の使用

+ +
unescape('abc123');     // "abc123"
+unescape('%E4%F6%FC');  // "äöü"
+unescape('%u0107');     // "ć"
+
+ +

仕様書

+ + + + + + + + + + + + +
仕様書
{{SpecName('ESDraft', '#sec-unescape-string', 'unescape')}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("javascript.builtins.unescape")}}

+ +

関連情報

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