在JavaScript的localstorage里怎么储存名为a值为b(b为一个变量名)对应的值的值
回答:localstorage.setItem('a', b) 即可,一般采用JSON转化后存储,存储对象较为方便使用