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

{{APIRef("XMLHttpRequest")}}

+ +

FormData.keys() 메서드는 이 객체에 포함된 모든 키를 통과하는 {{jsxref("Iteration_protocols",'iterator')}} 를 반환합니다. 키는 {{domxref("USVString")}} 객체입니다.

+ +
+

메모: 이 메서드는 웹워커(Web Workers)에서도 사용할 수 있습니다.

+
+ +

Syntax

+ +
formData.keys();
+ +

Return value

+ +

{{jsxref("Iteration_protocols","iterator")}}를 반환합니다.

+ +

Example

+ +
// Create a test FormData object
+var formData = new FormData();
+formData.append('key1', 'value1');
+formData.append('key2', 'value2');
+
+// Display the keys
+for (var key of formData.keys()) {
+   console.log(key);
+}
+
+ +

결과는 다음과 같습니다:

+ +
key1
+key2
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('XMLHttpRequest','#dom-formdata','keys() (as iterator<>)')}}{{Spec2('XMLHttpRequest')}}Initial definition
+ +

Browser compatibility

+ + + +

{{Compat("api.FormData.keys")}}

+ +

See also

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