Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

src property

Retrieves the URL to an external file that contains the source code or data.

Syntax

HRESULT value = object.put_src( v);HRESULT value = object.get_src(* p);

Property values

Type: BSTR

the URL of the source code or data.

Remarks

A script element can use the IHTMLScriptElement3::src attribute to refer to code stored in an external script library. If a script element refers to an external library and also contains code local to the block defined by the element, the code in the external library is executed before the local code.

Windows Internet Explorer 8 or later. In IE8 Standards mode, the value of the IHTMLScriptElement3::src attribute depends on the context of the reference to the attribute. When read as a Document Object Model (DOM) attribute, IHTMLScriptElement3::src returns an absolute URL. The value specified by the page author is returned when IHTMLScriptElement3::src is read as a content attribute, when the page is displayed in an earlier document compatibility mode, or when the page is viewed with an earlier version of the browser. For more information, see Attribute Differences in Internet Explorer 8.

In Microsoft Internet Explorer 5 and later, the IHTMLScriptElement3::src attribute of the script element can refer to an XML data set if the IHTMLElement::language attribute is set to XML.

The IHTMLScriptElement3::src attribute was first available in Microsoft Internet Explorer 3.022. The IHTMLScriptElement3::src property is exposed through the object model as of Microsoft Internet Explorer 4.0.

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.