Share via


IHTMLInputImage Object

IHTMLInputImage

Represents an INPUT element of type "image" in an HTML document. The IHTMLInputImage object provides access to a limited number of properties and methods related to the INPUT element. For access to additional properties and methods, use the FPHTMLInputImage object.

Using the IHTMLInputImage Object

Use the tags method to return an IHTMLElementCollection collection that represents a collection of all the INPUT elements in a document. Use the Item method to return an IHTMLInputImage object that accesses a specific INPUT element, referenced by ordinal number or by the value of the id attribute. Use the type property to determine the type of INPUT element.

Note  The type property is not a member of the IHTMLElement object; however, it will return valid results for the value of the type attribute for an element, which in this case is "image".

The following example places the first INPUT element in the active document into an IHTMLElement object variable, then uses the type property to determine the type of INPUT element, and places the variable into an appropriate object variable, providing access to the properties and methods that relate to INPUT elements of the specified type.

Dim objInput As IHTMLElement
Dim objButton As IHTMLInputButtonElement
Dim objFile As IHTMLInputFileElement
Dim objHidden As IHTMLInputHiddenElement
Dim objImage As IHTMLInputImage
Dim objText As IHTMLInputTextElement

Set objInput = ActiveDocument.all.tags("input").Item(0)

Select Case objInput.Type
    Case "button"
        Set objButton = objInput
    Case "file"
        Set objFile = objInput
    Case "hidden"
        Set objHidden = objInput
    Case "image"
        Set objImage = objInput
    Case "text"
        Set objText = objInput
End Select

Properties | Align Property | alt Property | border Property | complete Property | disabled Property | dynsrc Property | height Property | hspace Property | loop Property | lowsrc Property | name Property | onabort Property | onerror Property | onload Property | ReadyState Property | src Property | start Property | Type Property | vrml Property | vspace Property | width Property

Parent Objects

Child Objects