HTML <버튼> formaction 속성
예시
두 개의 제출 버튼이 있는 양식입니다. 첫 번째 제출 버튼은 "action_page.php"에 양식 데이터를 제출하고 두 번째 버튼은 "action_page2.php"에 제출합니다.
<form action="/action_page.php" method="get">
<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"><br><br>
<button
type="submit">Submit</button>
<button type="submit" formaction="/action_page2.php">Submit to another page</button>
</form>
정의 및 사용
속성 은 formaction
양식이 제출될 때 양식 데이터를 보낼 위치를 지정합니다. 이 속성은 양식의 속성을 재정의 action
합니다.
속성은 가 있는 formaction
버튼에만 사용됩니다
type="submit"
.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Attribute | |||||
---|---|---|---|---|---|
formaction | 9.0 | 10.0 | 4.0 | 5.1 | 15.0 |
통사론
<button type="submit" formaction="URL">
속성 값
Value | Description |
---|---|
URL | Specifies where to send the form data. Possible values:
|
❮ HTML <버튼> 태그