0

私は持っています:
localStorage.xxx = JSON.stringify([["something","hello"],["something2","hello2"]]);. のよう
に JSON に新しい配列を追加するにはどうすればよいですか。xxx["something3","hello3"]

4

1 に答える 1

2

次のような意味ですか。


var arr = JSON.parse( localStorage.xxx ) ;
arr.push( ["something3","hello3"] ) ;
localStorage.xxx  = JSON.stringify( arr ) ;
于 2012-04-06T09:41:21.907 に答える