blob: abe27b2a11e9fc1ce61f643d5510e03b3e25d148 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
---
title: Document.images
slug: Web/API/Document/images
translation_of: Web/API/Document/images
---
<div>{{APIRef("DOM")}}</div>
<p><code>document.images</code> restituisce una collezione delle <a href="/en-US/docs/DOM/Image" title="DOM/Image">immagini</a> nel documento HTML corrente.</p>
<h2 id="Syntax" name="Syntax">Sintassi</h2>
<pre class="syntaxbox"><em>var htmlCollection</em> = document.images;</pre>
<h2 id="Example" name="Example">Esempio</h2>
<pre class="brush:js">var ilist = document.images;
for(var i = 0; i < ilist.length; i++) {
if(ilist[i].src == "banner.gif") {
// found the banner
}
}</pre>
<h2 id="Notes" name="Notes">Note</h2>
<p><code>document.images.length</code> – proprietà che restituisce il numero di immagini della pagina.</p>
<p><code>document.images</code> è parte del DOM HTML, e funziona solo per documenti HTML.</p>
<h2 id="Specifications" name="Specifications">Specifiche tecniche</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specifiche tecniche</th>
<th scope="col">Stato</th>
<th scope="col">Commento</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('HTML WHATWG', '#dom-document-images', 'Document.images')}}</td>
<td>{{ Spec2('HTML WHATWG') }}</td>
<td> </td>
</tr>
<tr>
<td>{{SpecName('DOM2 HTML', 'html.html#ID-90379117', 'Document.images')}}</td>
<td>{{ Spec2('DOM2 Events') }}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
|