HTML <input> 형식 유형 속성

❮ HTML <입력> 태그

예시

기본 인코딩(첫 번째 제출 버튼)이고 "multipart/form-data"(두 번째 제출 버튼)로 인코딩된 양식 데이터를 보냅니다.

<form action="/action_page_binary.asp" method="post">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <input type="submit" value="Submit">
  <input type="submit" formenctype="multipart/form-data" value="Submit as Multipart/form-data">
</form>

정의 및 사용

속성 은 formenctype서버에 제출할 때 양식 데이터를 인코딩하는 방법을 지정합니다( 가 있는 양식에만 해당 method="post") .

속성은 요소 의 속성을 formenctype재정의합니다 .enctype<form>

참고: 속성 formenctype type="submit"및 와 함께 사용됩니다 type="image".


브라우저 지원

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

Attribute
formenctype Yes 10.0 Yes 5.1 10.6

통사론

<input formenctype="value">

속성 값

Value Description
application/x-www-form-urlencoded Default. All characters are encoded before sent (spaces are converted to "+" symbols, and special characters are converted to ASCII HEX values)
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 <입력> 태그