Target Attribute

HTML (DHTML)

Target Attribute

Internet Development Index

Defines a frame or window that a URL is displayed in. Read/write String.

Applies To

Shape

Tag Syntax

<v:element target="expression">

Remarks

The Target attribute is similar to the standard HTML Target attribute of anchors.

Values include:

Value Description
TargetName String containing the name of the frame or window in which to load the document.
_blank Specifies that the linked document is loaded into a new blank window. This window is not named.
_media Specifies that the linked document is loaded into the Media Bar. Available in Microsoft® Internet Explorer 6 or later.
_parent Specifies that the linked document is loaded into the immediate parent of the document containing the link.
_search Specifies that the linked document is loaded into the browser's search pane. Available in Microsoft Internet Explorer 5 or greater.
_self Specifies that the linked document is loaded into the window in which the link was clicked (the active window).
_top Specifies that the linked document is loaded into the topmost window.

VML Standard Attribute

Example

When the rectangle is clicked, the browser loads the Microsoft Corporation home page in the same window.

   <v:rect id=myrect fillcolor="red"
   href="http://www.microsoft.com" target="_self"
   style="position:relative;top:1;left:1;width:20;height:20">
   </v:rect>

Target Attribute Example. (Requires Microsoft Internet Explorer 5 or greater.)