HTML <입력> 양식 속성

❮ HTML <입력> 태그

예시

HTML 양식 외부에 있는 입력 필드(그러나 여전히 양식의 일부임):

<form action="/action_page.php" id="form1">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <input type="submit" value="Submit">
</form>

<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname" form="form1">

정의 및 사용

form속성은 요소가 속한 형식을 지정 합니다 <input>.


브라우저 지원

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

Attribute
form Yes Yes Yes 5.1 10.6

통사론

<input form="form_id">

속성 값

Value Description
form_id Specifies the form element the <input> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document.

❮ HTML <입력> 태그