title: set the value from an input field on my html page in Localstorage
body: <p>How can I set the value from an input field on my html page with localstorage.
  Like if I type something in an input field for example "Hello" and I press on a button Submit. Then the title from the page should change to "Hello". But it needs to be saved in localstorage if possible.</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-html lang-html prettyprint-override"><code>&lt;p&gt;Hello&lt;/p&gt;
  
  &lt;div class="form-group"&gt;
    &lt;label for="text"&gt;Change title:&lt;/label&gt;
      &lt;input type="text" class="form-control inputBox" id="text" name="text"&gt;
  &lt;/div&gt;
  
  &lt;button&gt;submit&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>