Compartir a través de


IHTMLImgElement interface

This interface provides access to some of the properties and methods supported by the img element and the input element of the image type. The other properties and methods are accessible through the IHTMLImgElement interface.

Members

The IHTMLImgElement interface inherits from the IDispatch interface. IHTMLImgElement also has these types of members:

  • Properties

Properties

The IHTMLImgElement interface has these properties.

Property Description

align

Sets or retrieves how the object is aligned with adjacent text.

alt

Sets or retrieves a text alternative to the graphic.

border

Sets or retrieves the width of the border to draw around the object.

complete

Retrieves whether the object is fully loaded.

dynsrc

This property is deprecated. Sets or retrieves the address of a video clip or VRML world to display in the window.

fileCreatedDate

Retrieves the date the file was created.

fileModifiedDate

Retrieves the date the file was last modified.

fileSize

Note   IHTMLImgElement::fileSize is no longer supported. Starting with IE11, use XMLHttpRequest to get the resource. For info, see Compatibility changes.
 

Retrieves the file size.

fileUpdatedDate

Retrieves the date the file was last updated.

height

Sets or retrieves the height of the object.

hspace

Sets or retrieves the horizontal margin for the object.

isMap

Sets or retrieves whether the image is a server-side image map.

loop

Sets or retrieves the number of times a sound or video clip will loop when activated.

lowsrc

Sets or retrieves a lower resolution image to display.

name

Sets or retrieves the name of the object.

nameProp

Retrieves the file name specified in the IHTMLLinkElement4::href or IHTMLEmbedElement2::src property of the object.

onload

Sets or retrieves a pointer to the event handler function associated with the HTMLFrameSiteEvents::onload event. The HTMLFrameSiteEvents::onload event occurs immediately after the browser loads the object.

protocol

Sets or retrieves the protocol portion of a URL.

readyState

Retrieves a value that indicates the current state of the object.

src

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

start

Sets or retrieves when a video clip file should begin playing.

useMap

Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.

vrml

Sets or retrieves the IHTMLDocument2::URL of the VRML world to be displayed in the window.

vspace

Sets or retrieves the vertical margin for the object.

width

Sets or retrieves the calculated width of the object.

 

Remarks

The img element embeds an image or a video clip in a document. It supports the HTMLFrameSiteEvents::onfocus event and can receive the input focus only if it has been associated with a map element.

This interface may also be referred to in code as IOmImage.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch