Collapse the table of content
Expand the table of content

target property

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


HRESULT value = object.put_target( v);HRESULT value = object.get_target(* p);

Property values

Type: BSTR


The name of the target window or frame.


Load the linked document into a new blank window. This window is not named.

For Windows Store apps using JavaScript only: Loads the linked document in the default browser. If the linked document is in the app's package, the link won't navigate to the document because the browser can't display documents contained in an app's package.


Load the linked document into the immediate parent of the document the link is in.


Default. Load the linked document into the window in which the link was clicked (the active window).


Load the linked document into the topmost window.


If there is no existing window or frame with the same name as specified in the IHTMLLinkElement2::target, a new window is opened with a name equal to the value of the IHTMLLinkElement2::target.

Windows Internet Explorer 8 and later. When Protected Mode is enabled and a webpage contains an anchor link with a named IHTMLLinkElement2::target, Windows Internet Explorer opens the target of the link in a new window when the target has a different integrity level than the webpage containing the link. For more information, see Understanding and Working in Protected Mode Internet Explorer.

In Microsoft Internet Explorer 6, the value of the IHTMLLinkElement2::target parameter of this property specifies that a linked document loads in the content area of the IHTMLLinkElement2::target.

In a Windows Store app using JavaScript, if you set the IHTMLLinkElement2::target attribute to the name of an iframe, the iframe loads the linked document. If the specified IHTMLLinkElement2::target doesn't exist, the link opens in the default browser.

For more info about navigation in Windows Store apps using JavaScript, see Supporting navigation.



Community Additions

© 2015 Microsoft