From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../reference/global_objects/decodeuri/index.html | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 files/ko/web/javascript/reference/global_objects/decodeuri/index.html (limited to 'files/ko/web/javascript/reference/global_objects/decodeuri') diff --git a/files/ko/web/javascript/reference/global_objects/decodeuri/index.html b/files/ko/web/javascript/reference/global_objects/decodeuri/index.html new file mode 100644 index 0000000000..bb29400506 --- /dev/null +++ b/files/ko/web/javascript/reference/global_objects/decodeuri/index.html @@ -0,0 +1,101 @@ +--- +title: decodeURI() +slug: Web/JavaScript/Reference/Global_Objects/decodeURI +tags: + - 자바스크립트 +translation_of: Web/JavaScript/Reference/Global_Objects/decodeURI +--- +
{{jsSidebar("Objects")}}
+ +

decodeURI() 함수는 {{jsxref("encodeURI")}}이나 비슷한 루틴으로 사전에 만들어진 URI(Uniform Resource Identifier, 인터넷식별자) 를 해독합니다.

+ +
{{EmbedInteractiveExample("pages/js/globalprops-decodeuri.html")}}
+ + + +

구문

+ +
decodeURI(encodedURI)
+ +

파라미터

+ +
+
encodedURI
+
완전하고 암호화된 인터넷식별자(URI)
+
+ +

리턴 값

+ +

주어진 암호화된 URI의 암호화되지 않은 버전을 나타내는 새 문자열을 반환합니다.

+ +

예외

+ +

encodedURI에 유효하지 않은 문자열이 포함된 경우 {{jsxref("URIError")}} ("malformed URI sequence") 예외를 던집니다.

+ +

설명

+ +

암호화된 URI의 각 이스케이프 시퀀스(확장문자열)를 자신을 나타내는 문자로 바꾸지만 {{jsxref ( "encodeURI")}}에서 도입할 수 없었던 이스케이프 시퀀스는 해독하지 않습니다. "#"문자는 이스케이프 시퀀스에서 해독되지 않습니다.

+ +

예제

+ +

Decoding a Cyrillic URL

+ +
decodeURI('https://developer.mozilla.org/ru/docs/JavaScript_%D1%88%D0%B5%D0%BB%D0%BB%D1%8B');
+// "https://developer.mozilla.org/ru/docs/JavaScript_шеллы"
+
+ +

Catching errors

+ +
try {
+  var a = decodeURI('%E0%A4%A');
+} catch(e) {
+  console.error(e);
+}
+
+// URIError: malformed URI sequence
+ +

사양

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES3')}}{{Spec2('ES3')}}Initial definition.
{{SpecName('ES5.1', '#sec-15.1.3.1', 'decodeURI')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-decodeuri-encodeduri', 'decodeURI')}}{{Spec2('ES6')}} 
{{SpecName('ESDraft', '#sec-decodeuri-encodeduri', 'decodeURI')}}{{Spec2('ESDraft')}} 
+ +

브라우저 호환성

+ + + +

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

+ +

참조

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