[Javascript] localStorage
◎ 추가localStorage.setItem('key', 'value’);◎ 읽기var value = localStorage.getItem(’key’);◎ 삭제localStorage.removeItem(’key’);◎ 전체삭제localStorage.clear();◎ 전체 갯수 확인localStorage.length;◎ Index로 키 값 찾기var key = localStorage.key(0);◎ 모든 Key와 Value 가져오기for(i=0; i◎ localStorage JSON을 이용한 Array/Object 저장localStorage.setItem('json_str', JSON.stringify({'key':'value'}) );var strJson = localStorage.getItem('j..
2024.06.10