HTML之本地存储
代码如下:
<script type="text/javascript">
window.localStorage.setItem(key,value);//保存数据
window.localStorage.getItem(key); //读取数据
window.localStorage.removeItem(key); //删除单个数据
window.localStorage.clear(); //删除所有数据
window.localStorage.key(index); //得到某个索引的值
</script>