--- title: slug: Web/HTML/Element/Input/image translation_of: Web/HTML/Element/input/image ---

<input type="image"> - это кнопка отправки в виде изображения. Вы можете использовать атрибут src, чтобы выбрать источник изображения и атрибут alt, чтобы добавить альтернативный текст. Атрибутами width и height можно указать размер изображения в пикселях.

Разрешённое содержимое Нету, это пустой элемент.
Необязательный закрывающийся тег Обязательно должен быть открывающийся тег, и обязательно отсутствует закрывающий.
Разрешённые родительские элементы Любой элемент, которому доступен фразообразующий контент (phrasing content).
DOM-интерфейс  {{domxref("HTMLInputElement")}}

Атрибуты

Этому элементу доступны глобальные атрибуты (global attributes).

{{htmlattrdef("type")}}

{{htmlattrdef("formaction")}} {{HTMLVersionInline("5")}}
The URI of a program that processes the information submitted by the input element, here image if specified, it overrides the {{htmlattrxref("action","form")}} attribute of the element's form owner.
{{htmlattrdef("formenctype")}} {{HTMLVersionInline("5")}}
If the input element is an image, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:

If this attribute is specified, it overrides the {{htmlattrxref("enctype","form")}} attribute of the element's form owner.

{{htmlattrdef("formmethod")}} {{HTMLVersionInline("5")}}
In image input element, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:

If specified, this attribute overrides the {{htmlattrxref("method","form")}} attribute of the element's form owner.

{{htmlattrdef("formnovalidate")}} {{HTMLVersionInline("5")}}
This Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the {{htmlattrxref("novalidate","form")}} attribute of the element's form owner.
{{htmlattrdef("formtarget")}} {{HTMLVersionInline("5")}}
This attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). If this attribute is specified, it overrides the {{htmlattrxref("target", "form")}} attribute of the element's form owner. The following keywords have special meanings:
{{htmlattrdef("height")}} {{HTMLVersionInline("5")}}
This attribute defines the height of the image displayed for the button.
{{htmlattrdef("required")}} {{HTMLVersionInline("5")}}
This attribute specifies that the user must fill in a value before submitting a form but it cannot be used when the type attribute is image type (submit, reset, or button). The {{cssxref(":optional")}} and {{cssxref(":required")}} CSS pseudo-classes will be applied to the field as appropriate.
{{htmlattrdef("src")}}
This attribute specifies a URI for the location of an image to display on the graphical submit button; otherwise it is ignored.
{{htmlattrdef("usemap")}} {{HTMLVersionInline(4)}} only, {{obsoleteGeneric("inline", "HTML5")}}
The name of a {{HTMLElement("map")}} element as an image map.
{{htmlattrdef("width")}} {{HTMLVersionInline("5")}}
This attribute defines the width of the image displayed for the button.

Примеры

Поле в виде логотипа Firefox 

<input type="image" name="image" src="https://mdn.mozillademos.org/files/2917/fxlogo.png" width="50">

Результат

{{ EmbedLiveSample('simple_input_image_example') }}

Спецификации

{{Specifications}}

Браузерная совместимость

{{Compat}}

Смотрите также