HTML <버튼> 양식 속성
예시
양식 외부에 있는 버튼(여전히 양식의 일부임):
<form action="/action_page.php" method="get" id="form1">
<label for="fname">First
name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname"
name="lname">
</form>
<button type="submit" form="form1"
value="Submit">Submit</button>
정의 및 사용
속성 은 form
버튼이 속한 형식을 지정합니다.
이 속성의 값은
동일한 문서에 있는 요소 의 id
속성 과 같아야 합니다.
<form>
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Attribute | |||||
---|---|---|---|---|---|
form | 10.0 | 16.0 | 4.0 | 5.1 | 9.5 |
통사론
<button form="form_id">
속성 값
Value | Description |
---|---|
form_id | Specifies the form element the <button> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |
❮ HTML <버튼> 태그