blob: 5f087d8d0e82871806d75d535205822712ac6c3f (
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
|
---
title: Window.history
slug: Web/API/Window/history
translation_of: Web/API/Window/history
---
<div>{{APIRef}}</div>
<p>Restituisce un riferimento all'oggetto <code>history</code>, che fornisce un'interfaccia per manipolare la Cronologia del browser.</p>
<h2 id="Sintassi" name="Sintassi">Sintassi</h2>
<pre class="eval"><i>oggettoHistory</i> = window.history
</pre>
<h3 id="Parametri" name="Parametri">Parametri</h3>
<ul>
<li><code>oggettoHistory</code> è un riferimento a un oggetto <code>history</code></li>
</ul>
<h2 id="Esempio" name="Esempio">Esempio</h2>
<pre>h = window.history;
if ( h.length ) { // se c'è una cronologia
h.back(); // vai indietro nella cronologia
}
</pre>
<h2 id="Note" name="Note">Note</h2>
<p>L'oggetto <code>history</code> fornisce la seguente interfaccia: current, length, next, previous, back(), forward(), go().</p>
<p>E' possibile accedere a questa interfaccia dall'oggetto <code>window</code> chiamando, per esempio, <code>window.history.back()</code>.</p>
<h2 id="Specifiche" name="Specifiche">Specifiche</h2>
<p>HTML5</p>
|