INPUT TYPE=image XHTML Element
A version of this page is also available for
4/8/2010
The INPUT TYPE=image element creates an image control that, when clicked, causes the form to be submitted immediately.
The click coordinates are measured from the upper-left of the image. They are submitted with the form as two name or value pairs. The x or y coordinate is submitted under the name of the control with the x or y appended.
Using this Element
There are some common properties and collections that apply to all the elements of the document object model, see Common Properties, Methods and Collections for the HTML Elements in Internet Explorer Mobile.
This element can be used within a web page with attributes.
This element can be used within scripts where it will have properties, events and methods.
Attributes
The following table shows items that Internet Explorer Mobile supports.
Attribute | Value | Description |
---|---|---|
ALIGN |
|
Specifies text alignment following the IMG reference relative to the graphic on the screen. > [!NOTE] > Supported only for devices running Pocket PC 2002 and Smartphone 2002 software or later. |
|
bottom |
|
|
left |
|
|
middle |
|
|
right |
|
|
top |
|
HEIGHT |
0…# |
Specifies the image height in pixels or as a percentage of the parent object. |
NAME |
String |
Specifies the image control name. |
ONCLICK |
|
Event that occurs when the user chooses the image control. > [!NOTE] > Supported only for devices running Pocket PC 2002 and Smartphone 2002 software or later. |
SRC |
URL |
Specifies the image URL to be loaded by the image control. |
TABINDEX |
|
Sets the order in which elements are tabbed to. > [!NOTE] > Supported only for devices running Windows Mobile 2003 software or later. |
VALIGN |
? |
Specifies text alignment following the IMG reference relative to the graphic on the screen. > [!NOTE] > Supported only for devices running and Smartphone 2002 software or later |
|
bottom |
|
|
middle |
|
|
top |
|
WIDTH |
0…# |
Specifies the width of the image in pixels or as a percentage of the parent object. |
Scripting Properties
The following table shows items that Internet Explorer Mobile supports.
Property | Type | Access | Comments |
---|---|---|---|
alt |
string |
Read |
|
border |
variant |
Read |
|
height |
long |
Read/Write |
|
hspace |
long |
Read |
|
onload |
function |
Read/Write |
|
src |
string |
Read/Write |
|
vspace |
long |
Read |
|
width |
long |
Read/Write |
|
Scripting Events
The following table shows items that Internet Explorer Mobile supports.
Event | Comment |
---|---|
onload |
|
Scripting Methods
This property has no associated methods.
Requirements
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |