“LocalStorage.SetItem” Respostas de código

JavaScript de armazenamento 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

Procure respostas de código populares por idioma

Procurar outros idiomas de código