TARGET Attribute | target Property
Sets or retrieves the window or frame at which to target the contents.
Syntax
HTML <ELEMENT TARGET = sTarget ... > Scripting object.target [ = sTarget ]
Possible Values
sTarget String that specifies one of the following values:
_blank Load the linked document into a new blank window. This window is not named. _parent Load the linked document into the immediate parent of the document the link is in. _search Load the linked document into the browser's search pane. Available in Internet Explorer 5 or later. _self Load the linked document into the same window the link was clicked in (the active window). _top Load the linked document into the topmost window. The property is read/write with no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic properties.
Remarks
If there is no frame or window that matches the specified target, a new window is opened for the link.
The default value for target depends on the URL and site. If the user does not leave the site, the default is _self, but if the user exits to a new site, the default is _top.
Example
This example uses the TARGET attribute to specify a link that loads the page into the topmost frame of the current frameset.
Sample Code
<A HREF="newpage.htm" TARGET="_top">Go to New Page.</A>
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus.
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.