Name
TARGET — NN all IE all HTML all
Synopsis
TARGET=”windowOrFrameName"Optional
If the HTML document returned from the server after it processes the
form submission is to be loaded into a window or frame other than the
current window or frame, you can specify where the returned document
should load by assigning a window or frame name to the
TARGET attribute. Target frame names must be
assigned to frames and windows as identifiers. Assign names to frames
via the NAME attribute of the
FRAME element; assign names to new windows via the
second parameter of the window.open() scripting
method. If you omit this attribute, the returned document replaces
the document containing the FORM element. An
identifier other than one belonging to an existing frame or window
opens a new window for the returned document.
A FORM element can have only one returned document
and one target. If you want a form submission to change the content
of multiple frames, you can include a script in the returned document
whose onLoad event handler loads or dynamically
writes a document into a different frame. (Set the
location.href property of each frame to a desired
URL.)
Example
<FORM METHOD=POST ACTION="http://www.giantco.com/cgi-bin/order" TARGET="new"> ... </FORM>
Value
Case-sensitive identifier when the frame or window name has been
assigned via the target element’s NAME
attribute. Four reserved target names act as constants:
-
_blank Browser creates a new window for the destination document.
-
_parent Destination document ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access