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/element/removeattribute/index.html | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 files/ko/web/api/element/removeattribute/index.html (limited to 'files/ko/web/api/element/removeattribute') diff --git a/files/ko/web/api/element/removeattribute/index.html b/files/ko/web/api/element/removeattribute/index.html new file mode 100644 index 0000000000..d31f6ded75 --- /dev/null +++ b/files/ko/web/api/element/removeattribute/index.html @@ -0,0 +1,66 @@ +--- +title: Element.removeAttribute() +slug: Web/API/Element/removeAttribute +tags: + - API + - DOM + - Element + - Method + - Reference +translation_of: Web/API/Element/removeAttribute +--- +
{{APIRef("DOM")}}
+ +

Element.removeAttribute() 메서드는 요소에서 주어진 이름의 특성을 제거합니다.

+ +

구문

+ +
element.removeAttribute(attrName);
+
+ +

매개변수

+ +
+
attrName
+
요소에서 제거할 특성 이름을 지정하는 {{domxref("DOMString")}}. 지정하지 않으면 오류 없이 아무 동작도 하지 않습니다.
+
+ +

반환 값

+ +

{{jsxref("undefined")}}.

+ +

사용 일람

+ +

많은 특성은 {{jsxref("null")}}을 대입했을 때 예상치 못한 동작을 하곤 합니다. 그러므로 특성을 삭제할 때 null을 직접 대입하거나, {{domxref("Element.setAttribute", "setAttribute()")}}의 매개변수로 제공하기보단 removeAttribute() 메서드를 사용해야 합니다.

+ +

예제

+ +
// Given: <div id="div1" align="left" width="200px">
+document.getElementById("div1").removeAttribute("align");
+// Now: <div id="div1" width="200px">
+
+ +

명세

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-element-removeattribute', 'Element" removeAttribute')}}{{Spec2('DOM WHATWG')}}
+ +

브라우저 호환성

+ + + +

{{Compat("api.Element.removeAttribute")}}

-- cgit v1.2.3-54-g00ecf