diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
| commit | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch) | |
| tree | d4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/api/storage/clear/index.html | |
| parent | 33058f2b292b3a581333bdfb21b8f671898c5060 (diff) | |
| download | translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2 translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip | |
initial commit
Diffstat (limited to 'files/de/web/api/storage/clear/index.html')
| -rw-r--r-- | files/de/web/api/storage/clear/index.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/files/de/web/api/storage/clear/index.html b/files/de/web/api/storage/clear/index.html new file mode 100644 index 0000000000..5e6c6d5678 --- /dev/null +++ b/files/de/web/api/storage/clear/index.html @@ -0,0 +1,61 @@ +--- +title: Storage.clear() +slug: Web/API/Storage/clear +tags: + - API Methode Storage +translation_of: Web/API/Storage/clear +--- +<p>{{APIRef("Web Storage API")}}</p> + +<p><font><font>Die Methode </font></font><code>clear()</code> der {{domxref("Storage")}}-Schnittstelle löscht sämtliche Datensätze des Objekts.</p> + +<h2 id="Syntax">Syntax</h2> + +<pre class="brush: js"><em>storage</em>.clear();</pre> + +<h3 id="Rückgabewert">Rückgabewert</h3> + +<p>{{jsxref("undefined")}}.</p> + +<h2 id="Beispiele">Beispiele</h2> + +<p><font><font>Die folgende Funktion speichert drei Datensätze und löscht sie abschließend mit </font></font><code>clear()</code>.</p> + +<pre class="brush: js">function populateStorage() { + localStorage.setItem('bgcolor', 'red'); + localStorage.setItem('font', 'Helvetica'); + localStorage.setItem('image', 'miGato.png'); + + localStorage.clear(); +}</pre> + +<div class="note"> +<p><strong>Hinweis</strong>: Weitere Beispiele sind im <a href="https://mdn.github.io/dom-examples/web-storage/">Web-Storage-Demo</a> zu finden.</p> +</div> + +<h2 id="Spezifikationen">Spezifikationen</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Spezifikation</th> + <th scope="col">Status</th> + <th scope="col">Kommentar</th> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG', 'webstorage.html#dom-storage-clear', 'Storage.clear')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="Browserkompatibilität">Browserkompatibilität</h2> + + + +<p>{{Compat("api.Storage.clear")}}</p> + +<h2 id="Siehe_auch">Siehe auch</h2> + +<p><a href="/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API">Using the Web Storage API</a></p> |
