HTML input formaction property
Examples
With two submit buttons HTML forms (different action values):
<form action="demo-form.php">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="提交"><br>
<input type="submit" formaction="demo-admin.php" value="提交">
</form>
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="提交"><br>
<input type="submit" formaction="demo-admin.php" value="提交">
</form>
try it"
Browser Support
Internet Explorer 10, Firefox, Opera, Chrome and Safari support formaction property.
Note: 9 and earlier versions of Internet Explorer do not support the <input> tag formaction property.
Definition and Usage
URL formaction attribute specifies the input control process when the form submissions.
formaction property overrides <form> element's action attribute.
Note: formaction property applies to type = "submit" and type = "image".
Differences between HTML 4.01 and HTML5
formaction attribute is new in HTML5 attributes.
grammar
<input formaction=" URL ">
Property Value
值 | 描述 |
---|---|
URL | 规定当表单提交时处理输入控件的文件的 URL。 可能的值:
|
HTML <input> tag