HTML <input> formaction 속성

❮ HTML <입력> 태그

예시

다른 작업과 함께 두 개의 제출 버튼이 있는 HTML 양식:

<form action="/action_page.php">
  <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>
  <input type="submit" value="Submit">
  <input type="submit" formaction="/action_page2.php" value="Submit to another page">
</form>

정의 및 사용

속성 은 formaction양식이 제출될 때 입력 컨트롤을 처리할 파일의 URL을 지정합니다.

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

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


브라우저 지원

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

Attribute
formaction Yes 10.0 Yes 5.1 10.6

통사론

<input formaction="URL">

속성 값

Value Description
URL Specifies the URL of the file that will process the input control when the form is submitted.

Possible values:

  • An absolute URL - the full address of a page (like href="http://www.example.com/formresult.asp")
  • A relative URL - points to a file within the current site (like href="formresult.asp")

❮ HTML <입력> 태그