TARGET Attribute | target Property

MS Office DHTML, HTML & CSS

 
Click to return to the DHTML, HTML & CSS home page    
tagUrn Property     text Property     DHTML Properties    

TARGET Attribute | target Property


Sets or retrieves the window or frame at which to target the contents.

Syntax

HTML<ELEMENT TARGET = sTarget ... >
Scriptingobject.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 propertiesInternet Link.

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 ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.

A, AREA, BASE, FORM


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.