title: how to store a new object with javascript for every input and display
body: <p>I want to build a forum with firebase, so i'm learning how to store data to local storage first, so I encountered a new issue.</p>
  <p>I want to store every new input in my local storage with a different key and display the values 'when the website loads' in separate div each, more like aa forum, so that every post a user make, it will always be there in a different container.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var nameInput=document.getElementById('name');
  var numberInput=document.getElementById('number');
  var emailInput=document.getElementById('email');
  function get() {
    var SaveInfo=JSON.parse(localStorage.getItem("Info"));
    document.getElementById("text3").innerHTML=SaveInfo.name;
    document.getElementById("text4").innerHTML=SaveInfo.number;
    document.getElementById("text5").innerHTML=SaveInfo.email;
    document.getElementById("text6").innerHTML=SaveInfo.name;
    document.getElementById("text7").innerHTML=SaveInfo.number;
    document.getElementById("text8").innerHTML=SaveInfo.email;
  }
  
  function myFunction() {
    var nameInput=document.getElementById('name');
    var numberInput=document.getElementById('number');
    var emailInput=document.getElementById('email');
    var SaveInfo=JSON.parse(localStorage.getItem("Info"));
    var name=nameInput.value;
    var number=numberInput.value;
    var email=emailInput.value;
    var Info= {
      name: name, number: number, email: email
    }
    localStorage.setItem("Info", JSON.stringify(Info));
    console.log(SaveInfo.number);
  }
  
  function save() {
    get();
    myFunction();
    var SaveInfo=JSON.parse(localStorage.getItem("Info"));
    document.getElementById("text").innerHTML=nameInput.value;
    document.getElementById("text1").innerHTML=numberInput.value;
    document.getElementById("text2").innerHTML=emailInput.value;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body onload="get()"&gt;
    &lt;div class="message_sent_wrapper shadow"&gt;
      &lt;h1 id="text"&gt;
      &lt;/h1&gt;
      &lt;h4 id="text1" class="text1"&gt;
      &lt;/h4&gt;
      &lt;h6 id="text2"&gt;&lt;/h6&gt;
    &lt;/div&gt;
  
    &lt;div class="message_sent_wrapper1 shadow"&gt;
      &lt;h1 id="text3"&gt;
      &lt;/h1&gt;
      &lt;h4 id="text4" class="text1"&gt;
      &lt;/h4&gt;
      &lt;h6 id="text5"&gt;&lt;/h6&gt;
    &lt;/div&gt;
    &lt;input type="text" id="name" class="chat_input"&gt;
    &lt;input type="number" id="number" class="chat_input"&gt;
    &lt;input type="text" id="email" class="chat_input"&gt;
    &lt;button onclick="save()" id="button"&gt; Submit&lt;/button&gt;
  &lt;/body&gt;
  
  
  
  
  
  &lt;!-- begin snippet: js hide: false console: true babel: false --&gt;</code></pre>
  </div>
  </div>
  </p>