Baseline Widely available *
ÐнÑеÑÑÐµÐ¹Ñ HTMLImageElement
пÑедоÑÑавлÑÐµÑ ÑпеÑиалÑнÑе ÑвойÑÑва и меÑÐ¾Ð´Ñ (ÑаÑÑиÑÑÑ Ð¾Ð±ÑÑнÑй инÑеÑÑÐµÐ¹Ñ HTMLElement
) Ð´Ð»Ñ ÑпÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð²ÑÑÑÑкой и оÑобÑажением ÑлеменÑа <img>
.
must be a string
СвойÑÑваÐаÑледÑÐµÑ ÑвойÑÑва ÑодиÑелÑ, HTMLElement
.
align
DOMString
УказÑÐ²Ð°ÐµÑ ÑаÑположение каÑÑинки завиÑÑÑее Ð¾Ñ Ð¾ÐºÑÑжаÑÑего конÑенÑа. ÐозможнÑе знаÑениÑ: "left"
, "right"
, "justify"
, и "center"
. alt
DOMString
ÐовÑоÑÑÐµÑ Ð°ÑÑибÑÑ HTML alt
ÑказÑваÑÑий на запаÑной конÑекÑÑ ÐºÐ°ÑÑинки. border
DOMString
ШиÑина Ñамки вокÑÑг каÑÑинки. УÑÑаÑело и вмеÑÑо него ÑледÑÐµÑ Ð¸ÑполÑзоваÑÑ ÑвойÑÑво CSS border
. complete
ТолÑко Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ Boolean
ÐозвÑаÑÐ°ÐµÑ true, еÑли бÑаÑÐ·ÐµÑ Ð·Ð°ÐºÐ¾Ð½Ñил загÑÑÐ·ÐºÑ ÐºÐ°ÑÑинки Ñ Ð¾Ñибкой или ÑÑпеÑно. Также возвÑаÑÐ°ÐµÑ true, когда не ÑÑÑановлено знаÑение src
, во вÑеÑ
оÑÑалÑнÑÑ
ÑлÑÑаÑÑ
- false. crossOrigin
DOMString
ЯвлÑеÑÑÑ DOMString
, Ñ Ð½Ð°ÑÑÑойками CORS Ð´Ð»Ñ ÑÑого ÑлеменÑа изобÑажениÑ. ÐополниÑелÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑиÑ: ÐÑÑибÑÑÑ Ð½Ð°ÑÑÑоек CORS. currentSrc
ТолÑко Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ ÐкÑпеÑименÑалÑÐ½Ð°Ñ Ð²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð¾ÑÑÑ DOMString
ÐозвÑаÑÐ°ÐµÑ DOMString
Ñ URL-адÑеÑом ÑекÑÑего изобÑÐ°Ð¶ÐµÐ½Ð¸Ñ (ÑÑо Ð¼Ð¾Ð¶ÐµÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑÑÑ, напÑимеÑ, в оÑÐ²ÐµÑ Ð½Ð° запÑоÑÑ Ð¼ÑлÑÑимедиа). height
unsigned long
ÐÑÑÐ°Ð¶Ð°ÐµÑ Ð°ÑÑибÑÑ height
HTML, ÑказÑÐ²Ð°Ñ Ð²Ð¸Ð·ÑализиÑованнÑÑ Ð²ÑÑоÑÑ Ð¸Ð·Ð¾Ð±ÑÐ°Ð¶ÐµÐ½Ð¸Ñ Ð² пикÑелÑÑ
CSS. hspace
long
Space to the left and right of the image. isMap
Boolean
Reflects the ismap
HTML attribute, indicating that the image is part of a server-side image map. longDesc
DOMString
URI of a long description of the image. lowSrc
DOMString
A reference to a low-quality (but faster to load) copy of the image. name
DOMString
naturalHeight
ТолÑко Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ unsigned long
Intrinsic height of the image in CSS pixels, if it is available; otherwise, 0
. naturalWidth
ТолÑко Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ unsigned long
Intrinsic width of the image in CSS pixels, if it is available; otherwise, 0
. src
DOMString
Reflects the src
HTML attribute, containing the URL of the image. srcset
ÐкÑпеÑименÑалÑÐ½Ð°Ñ Ð²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð¾ÑÑÑ useMap
DOMString
Reflects the usemap
HTML attribute, containing a partial URL of a map element. vspace
long
Space above and below the image. width
unsigned long
Reflects the width
HTML attribute, indicating the rendered width of the image in CSS pixels. x
ТолÑко Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ Ðе ÑÑандаÑÑно long
The horizontal offset from the nearest layer. (Mimic an old Netscape 4 behavior) y
ТолÑко Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ Ðе ÑÑандаÑÑно long
The vertical offset from the nearest layer. (Mimic an old Netscape 4 behavior) ÐеÑодÑ
ÐаÑледÑÐµÑ Ð¼ÐµÑÐ¾Ð´Ñ ÑодиÑелÑ, HTMLElement
.
HTMLImageElement.Image()
The Image()
constructor, taking two optional unsigned
long
, the width and the height of the resource, creates an instance of HTMLImageElement
not inserted in a DOM tree.
var img1 = new Image(); // ÐонÑÑÑÑкÑÐ¾Ñ HTML5
img1.src = "image1.png";
img1.alt = "alt";
document.body.appendChild(img1);
var img2 = document.createElement("img"); // ÐÑполÑзÑем HTMLImageElement
img2.src = "image2.jpg";
img2.alt = "alt text";
document.body.appendChild(img2);
// вÑбиÑаем пеÑвое изобÑажение на ÑÑÑаниÑе
alert(document.images[0].src);
СпеÑиÑикаÑии СовмеÑÑимоÑÑÑ Ñ Ð±ÑаÑзеÑами СмоÑÑиÑе Ñакже
<img>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4