Latest web development tutorials

HTML 버튼 formaction 속성

HTML 버튼을 참조 설명서 라벨 HTML <버튼> 태그

(가) 두 번째 폼 데이터를 "demo_admin.html"를 제출 버튼을 제출, 최초의 "demo_form.html"에 양식 데이터를 제출 버튼을 제출, (다른 조치)이 버튼을 사용하여 양식을 제출하십시오

<form action="demo_form.html" method="get">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<button type="submit">提交</button><br>
<button type="submit" formaction="demo_admin.html">提交</button>
</form>

»시도

브라우저 지원

Internet ExplorerFirefoxOperaGoogle ChromeSafari

인터넷 익스플로러 10, 파이어 폭스, 오페라, 크롬, 사파리 지원 formaction 속성입니다.

참고 : 인터넷 익스플로러 9 이전 버전의 IE의 formaction 속성을 지원하지 않습니다.


정의 및 사용

formaction 속성은 폼 요소의 우선 작업 속성을.

함께 사용이 속성 유형 = "제출".


HTML 4.01과 HTML5의 차이점

formaction 속성은 HTML 5 속성의 새로운 기능입니다.


문법

<button type="submit" formaction=" URL ">

속성 값

描述
URL 规定将表单数据发送到的地址。

可能值:

  • 绝对 URL - 完整的页面URL地址(如:href="http://www.example.com/formresult.html")
  • 相对 URL 地址 -指向当前网站的一个文件(如:href="formresult.html")


HTML 버튼을 참조 설명서 라벨 HTML <버튼> 태그