<input type = "text" id = "noteinput"> <button id = "takenote">Add</button> <b<h1 id = "print"></h1>
var takeNote = document.getElementById('takenote'); takeNote.addEventListener('click', () =>{ var date = Date(); var post = document.getElementById("noteinput").value; localStorage.setItem('userInputValue',post) document.getElementById("print").innerHTML = `Note to self: ${post}`; }); window.addEventListener('load',()=>{ var savedUserData = localStorage.getItem('userInputValue'); document.getElementById("print").innerHTML = savedUserData; });
arrays
JSON.stringify()
JSON.parse()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)