decodeURIComponent()

You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!

decodeURIComponent() 함수는 encodeURIComponent 나 비슷한 방법으로 생성된 Uniform Resource Identifier(URI) 컴포넌트를 해독합니다.

구문

decodeURIComponent(encodedURI)

매개변수

encodedURI
암호화된 Uniform Resource Identifier(URI) 컴포넌트.

반환 값

이스케이프되지 않은 특정 글자들 중 새로운 문자열.

예외

잘못 사용되었을 경우 URIError ( " malformed URI sequence ") 예외를 발생시킵니다.

설명

암호화된 URI 컴포넌트에서 각각의 이스케이프 시퀀스(확장 문자열)를 자신을 나타내는 문자로 바꿉니다.

예제

키릴문자 URL 컴포넌트의 복호화

decodeURIComponent("JavaScript_%D1%88%D0%B5%D0%BB%D0%BB%D1%8B");
// "JavaScript_шеллы"

명세

Specification Status Comment
ECMAScript 3rd Edition (ECMA-262) Standard 초기 정의.
ECMAScript 5.1 (ECMA-262)
The definition of 'decodeURIComponent' in that specification.
Standard  
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'decodeURIComponent' in that specification.
Standard  
ECMAScript Latest Draft (ECMA-262)
The definition of 'decodeURIComponent' in that specification.
Draft  

브라우저 호환성

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
decodeURIComponentChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 5.5Opera Full support YesSafari Full support YesWebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0nodejs Full support Yes

Legend

Full support  
Full support

같이 보기