Export (0) Print
Expand All

IHTMLFrameBase::src Property

Sets or retrieves a URL to be loaded by the object.

Syntax


HRESULT IHTMLFrameBase::get_src(BSTR *p);HRESULT IHTMLFrameBase::put_src(BSTR v);

Parameters

p
Pointer to a variable of type BSTR that receives the URL.
v
BSTR that specifies the URL.

Return Value

Returns S_OK if successful, or an error value otherwise.

Example

This example uses the IHTMLFrameBase::src property to change the IHTMLFrameBase::src attribute of an iframe.



function changeFrame(){
  alert (document.all.iframe1.src);
  document.all.iframe1.src="http://www.microsoft.com/";
  alert (document.all.iframe1.src);
}

Community Additions

ADD
Show:
© 2014 Microsoft