A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/ko/docs/Web/API/Storage/length below:

Storage.length - Web API | MDN

Storage.length

Baseline Widely available

Storage 인터페이스의 length 읽기 전용 속성은 Storage 객체에 저장된 데이터 항목의 수를 반환합니다.

구문 반환 값

Storage 객체에 저장된 항목의 수.

예제

다음의 함수는 현재 도메인의 로컬 저장소에 세 개의 항목을 추가한 후 저장소 항목의 수를 반환합니다.

function populateStorage() {
  localStorage.setItem("bgcolor", "yellow");
  localStorage.setItem("font", "Helvetica");
  localStorage.setItem("image", "cats.png");

  return localStorage.length; // Should return 3
}

참고 : 실제 사용 예제를 보시려면 저희의 Web Storage Demo를 방문하세요.

명세 브라우저 호환성 같이 보기

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4