为什么我让每个单独的字符都显示为 0 之类的值:{
memory=to;
var store='[';
$.each($('.spoke'),function(){
store=store+'"'+$(this).attr('id')+'":"'+hexEncode('<div class="spoke"from="'+$(this).attr('from')+'"id="'+$(this).attr('id')+'">'+$(this).html()+'</div>')+'",';
});
store=store+']';store=store.replace(',]',']');
$.localStorage.setItem(memory,JSON.stringify(store));
var posts=$.localStorage.getItem(memory);
posts=JSON.parse(posts);
alert(posts);
$.each(posts, function(key, value){
alert(key+' : '+value);
});
-------------------------哇,我太累了,它的 3:15 固定
function save(){
memory=to;
var store={};
$.each($('.spoke'),function(){
var id=$(this).attr('id');
var p=hexEncode('<div class="spoke"from="'+$(this).attr('from')+'"id="'+$(this).attr('id')+'">'+$(this).html()+'</div>');
store[id]=p;
});
$.localStorage.setItem(memory,JSON.stringify(store));
var posts=$.localStorage.getItem(memory);
posts=JSON.parse(posts);
$.each(posts, function(key, value){
$('#log').append(hexDecode(value)+' it works');
//$.each(value, function(key, value){
//$('#log').append(value+' it works2');
});//});