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/has/index.html | 73 ++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 files/ko/web/api/formdata/has/index.html (limited to 'files/ko/web/api/formdata/has') diff --git a/files/ko/web/api/formdata/has/index.html b/files/ko/web/api/formdata/has/index.html new file mode 100644 index 0000000000..8340fee6af --- /dev/null +++ b/files/ko/web/api/formdata/has/index.html @@ -0,0 +1,73 @@ +--- +title: FormData.has() +slug: Web/API/FormData/has +translation_of: Web/API/FormData/has +--- +

{{APIRef("XMLHttpRequest")}}

+ +

{{domxref("FormData")}} 인터페이스의 has() 메서드는 FormData 객체에 특정 키가 들어 있는지 여부를 나타내는 boolean 을 반환합니다.

+ +
+

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

+
+ +

Syntax

+ +
formData.has(name);
+ +

Parameters

+ +
+
name
+
테스트 하려는 키의 이름을 나타내는 {{domxref("USVString")}} 입니다.
+
+ +

Returns

+ +

{{domxref("Boolean")}}.

+ +

Example

+ +

다음 코드를 따라 빈 FormData 객체를 만듭니다:

+ +
var formData = new FormData();
+ +

다음 스니펫(코드 조각)은 FormData 객체안에 username 이 존재하는지 테스트한 결과와, {{domxref("FormData.append")}}를 사용하여 username 에 값을 추가한 이후의 결과를 보여줍니다 :

+ +
formData.has('username'); // Returns false
+formData.append('username', 'Chris');
+formData.has('username'); // Returns true
+
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('XMLHttpRequest','#dom-formdata-has','has()')}}{{Spec2('XMLHttpRequest')}} 
+ +

Browser compatibility

+ + + +

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

+ +

See also

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