Sea*_*ean 1 javascript database json local-storage
这是第一篇文章
我正在尝试复制这种JSON对象,以便我可以使用stringify将其存储在localStorage中:
我希望能够在事件被捕获时在历史记录内创建一个新的noteState但不知道如何去做这件事.
var history = {
"noteState1": [
{created: new Date(),
modified: new Date(),
left: "100",
top: "200",
text: "hello"},
{created: new Date(),
modified: new Date(),
left: "150",
top: "250",
text: "new"},
{created: new Date(),
modified: new Date(),
left: "200",
top: "300",
text: "world"}
],
"noteState2": [
{created: new Date(),
modified: new Date(),
left: "100",
top: "200",
text: "hello"},
{created: new Date(),
modified: new Date(),
left: "150",
top: "250",
text: "new"},
{created: new Date(),
modified: new Date(),
left: "200",
top: "300",
text: "world"}
]
}
Run Code Online (Sandbox Code Playgroud)
如何在历史记录中创建一个包含单个数组的新成员?
| 归档时间: |
|
| 查看次数: |
326 次 |
| 最近记录: |