From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../ko/web/api/urlsearchparams/tostring/index.html | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/ko/web/api/urlsearchparams/tostring/index.html (limited to 'files/ko/web/api/urlsearchparams/tostring') diff --git a/files/ko/web/api/urlsearchparams/tostring/index.html b/files/ko/web/api/urlsearchparams/tostring/index.html new file mode 100644 index 0000000000..45f0373dec --- /dev/null +++ b/files/ko/web/api/urlsearchparams/tostring/index.html @@ -0,0 +1,78 @@ +--- +title: URLSearchParams.toString() +slug: Web/API/URLSearchParams/toString +translation_of: Web/API/URLSearchParams/toString +--- +

{{ApiRef("URL API")}}

+ +

toString() 은 {{domxref("URLSearchParams")}} 인터페이스의 메소드로서, URL에서 사용할 수 있는 쿼리 문자열을 리턴합니다.

+ +
+

Note: 이 메소드는 물음표가 없는 쿼리 문자열을 리턴합니다. 이는 물음표를 포함하여 리턴하는 window.location.search와는 다른 부분입니다.

+
+ +

{{availableinworkers}}

+ +

Syntax

+ +
URLSearchParams.toString()
+ +

Parameters

+ +

None.

+ +

Return value

+ +

A {{domxref("DOMString")}}, without the question mark.

+ +

Examples

+ +
let url = new URL('https://example.com?foo=1&bar=2');
+let params = new URLSearchParams(url.search.slice(1));
+
+//두번째 foo 파라미터를 추가합니다.
+params.append('foo', 4);
+console.log(params.toString());
+//'foo=1&bar=2&foo=4'를 출력합니다.
+
+// note: params can also be directly created
+let url = new URL('https://example.com?foo=1&bar=2');
+let params = url.searchParams;
+
+// or even simpler
+let params = new URLSearchParams('foo=1&bar=2');
+
+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('URL', '#interface-urlsearchparams', "toString() (see \"stringifier\")")}}{{Spec2('URL')}}Initial definition.
+ +

Browser compatibility

+ +
+ + +

{{Compat("api.URLSearchParams.toString")}}

+
+ +

See also

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