HTML <버튼> 형식 유형 속성

❮ HTML <버튼> 태그

예시

두 개의 제출 버튼이 있는 양식입니다. 첫 번째 제출 버튼은 기본 문자 인코딩을 사용하여 양식 데이터를 제출하고 두 번째 버튼은 문자 인코딩 없이 양식 데이터를 제출합니다.

<form action="/action_page_binary.asp" method="post">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname" value="Ståle"><br><br>
  <button type="submit">Submit with character encoding</button>
  <button type="submit" formenctype="text/plain">Submit without character encoding</button>
</form>

정의 및 사용

속성 은 formenctype양식 데이터를 서버로 보내기 전에 인코딩하는 방법을 지정합니다. 이 속성은 양식의 속성을 재정의 enctype합니다.

속성은 가 있는 formenctype버튼에만 사용됩니다 type="submit".


브라우저 지원

표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.

Attribute
formenctype 9.0 10.0 4.0 5.1 11.5

통사론

<button type="submit" formenctype="value">

속성 값

Value Description
application/x-www-form-urlencoded Default. All characters will be encoded before sent
multipart/form-data  This value is necessary if the user will upload a file through the form
text/plain Sends data without any encoding at all. Not recommended

❮ HTML <버튼> 태그