“localstorage.setItem” Réponses codées

Javascript de stockage local

localStorage.setItem('user_name', 'Rohit'); //store a key/value
var retrievedUsername = localStorage.getItem('user_name'); //retrieve the key
Grepper

javascript localstorage

localStorage.setItem("user_name", "Bob");

document.body.addEventListener("click", function(){
  alert(localStorage.getItem("user_name"))
});
Breakable Baboon

javascript localstorage

var KeyName = window.localStorage.key(index);
Upset Unicorn

localstorage.setItem

storage.setItem(keyName, keyValue);
Salman MD

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code