“localstorage.removeItem ()” Réponses codées

Supprimer Localstorage

localStorage.removeItem("key");
Itchy Ibis

éléments clairs JavaScript localstorage

localStorage.clear();//this clears the localStorage completely
The Amateur

Supprimer l'élément de Localstorage

localStorage.removeItem('key');
Envious Earthworm

Localstorage Supprimer l'article

localStorage.setItem('image', 'myCat.png');
...
localStorage.removeItem('image');
GutoTrosla

localstorage.removeItem ()

// Don't use removeItem() that as the name says removes the whole item from localStorage. Just do another setItem() to overwrite the old data.
questions.splice(index, 1);
localStorage.setItem('questions',JSON.stringify(questions));
Skillup

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code