Definition and Usage The target attribute specifies where the new page should be opened. The form data is sent to the page specified in the...
Definition and Usage
The target attribute specifies where the new page should be opened.
The form data is sent to the page specified in the action attribute.
The target attribute for form is not supported in XHTML 1.0 Strict DTD.
Syntax
<form target="target_frame"> |
Syntax Example
Attribute Values
Value | Description |
_blank | The target URL will open in a new window. |
_self | The target URL will open in the same frame as it was clicked. |
_parent | The target URL will open in the parent frameset. |
_top | The target URL will open in the full body of the window. |
framename | The name of the target frame the URL should open in. |
Browser Support
The attribute is supported in all major browsers.
Example
<form action="realhackings.aspx" target="_blank">
First name:
<input type="text" name="FirstName" value="harry" />
<br />
Last name:
<input type="text" name="LastName" value="potter" />
<br />
<input type="submit" value="Submit" />
</form> |