Browser storage in jQuery
localStorage.setItem()的使用
Using a function localStorage.setItem(key,data)
which is a string parameter passed, the name is stored in the browser, and the other is a data, an object is typically passed, need to pay attention to the object JSON.stringify()
to convert it to a string.
2. localStorage.getItem(key)
This function reads data from the browser by passing in a stored name
3. Practice
imitation ToDolist website
code, see imitation todolist Code