Name
target — NN n/a IE 4 DOM n/a
Synopsis
Read/Write
The name of the window or frame that is to receive content as the
result of navigating to a link or any other action on the page that
loads a new document. Such names are assigned to frames by the
FRAME element’s NAME
attribute; for subwindows, the name is assigned via the second
parameter of the window.open( ) method. If you are
scripting the navigation of another window or frame, use the window
or frame name in a statement that assigns a new URL to the
location.href property
(frameName
.location.href
=
"
newURL
").
Example
document.all.myBase.target = "_top"
Value
String value of the window or frame name, or any of the following
constants (as a string): _parent |
_self | _top |
_blank. The _parent value
targets the frameset to which the current document belongs; the
_self value targets the current window; the
_top value targets the main browser window,
thereby eliminating all frames; and the _blank
value creates a new window of default size.
Default
_self
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