Skip to main content

HTMLImageElement.SetAttribute

SetAttribute

Syntax

SetAttribute(<Name>, <Value>)

Parameters

<Name> (required)

An attribute name.

<Value> (required)

Type: String. An attribute value.

Description

Sets the value of an attribute with a given name. If there is no attribute with this name, then it will be created.

Availability

Thin client, mobile client, server, thick client, external connection, mobile application (client), mobile application (server), mobile standalone server.

Note

If the attribute name contains characters incompatible with XML standard of this document, or the node is read-only, an exception is triggered.

Translation

Русская версия: ЭлементКартинкаHTML.УстановитьАтрибут (HTMLImageElement.SetAttribute)