how to use local storage with a form in javascript code example Example: set localstorage value localStorage.setItem("mytime", Date.now());