HTML formtarget attribute
Example
A form with two submit buttons that submit to different target windows:
<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=">Normal submission
"
<input type="submit" formtarget="_blank" value=">Submit to a new page
"
form
Try it »
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| formtarget | Yes | 10.0 | Yes | 5.1 | 10.6 |
Definition and Usage
The formtarget attribute specifies the name or keyword indicating where to display the response received after the form is submitted.
The formtarget attribute overrides the
HTML tag