title: Save input data to localStorage on button click
body: <p>I am trying to build my first web application. In my app I need to have a settings panel, but I have no idea how to do it. I've been searching the web and came across a HTML5 localStorage, which I believe might be the best way to do the things. But the problem is I have no idea how to use it.</p>
  
  <pre><code>&lt;input type='text' name="server" id="saveServer"/&gt;  
  </code></pre>
  
  <p>How can I save data from input to localStorage when user clicks the button? Something like this?</p>
  
  <pre><code>&lt;input type='text' name="server" id="saveServer"/&gt;  
  
  &lt;button onclick="save_data()" type="button"&gt;Save/button&gt;
  
      &lt;script&gt;
              function saveData(){
          localStorage.saveServer
          }
          &lt;/script&gt;
  </code></pre>