📜  javascript 在本地存储中存储日期 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:26.329000             🧑  作者: Mango

代码示例1
var a = new Date();
localStorage.setItem("a",a);
var b = new Date(localStorage.getItem("a")); 

//b now equals a (you have stored and retreived a date in localStorage)