Monaca 端末にデータを保存する方法 | Utage Blog

        localStorage.setItem('nameList', JSON.stringify({
                        name1: document.getElementById("nameBox").value,
                        name2: document.getElementById("nameBox2").value,
                        name3: document.getElementById("nameBox3").value
        nameList = JSON.parse(localStorage.getItem('nameList'));  
        for (var nameKey in nameList) {
          text = nameKey + " : " + nameList[nameKey];
          document.getElementById('itemArea')
              .appendChild(document.createElement('li'))
              .appendChild(document.createTextNode(text));
      function clearStorage() {
        var itemArea = document.getElementById('itemArea');
        while(itemArea.firstChild) {
          itemArea.removeChild(itemArea.firstChild);