// sessionStorage.setItem("message",str);function saveStorage(id){ var target = document.getElementById(id); var str = target.value; //保存数据的方法 key value localStorage.setItem("message",str);} function loadStorage(id){ var target = document.getElementById(id); var msg = localStorage.getItem("message"); target.innerHTML = msg;}
时间: 2024-10-10 10:13:44